Skip to content

Commit

Permalink
Don't allow assignment and copy construction of ConfFileTemp
Browse files Browse the repository at this point in the history
Accidental assignment of these objects would mean undeleted temp files
when running tests; nothing grotesque.
  • Loading branch information
halfgaar committed Mar 1, 2024
1 parent 1139689 commit 9e4c51f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions FlashMQTests/conffiletemp.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ class ConfFileTemp
const std::string &getFilePath() const;
void writeLine(const std::string &line);
void closeFile();

ConfFileTemp &operator=(const ConfFileTemp &other) = delete;
ConfFileTemp(const ConfFileTemp &other) = delete;
ConfFileTemp(ConfFileTemp &&other) = delete;
};

#endif // CONFFILETEMP_H

0 comments on commit 9e4c51f

Please sign in to comment.