diff options
author | André Nusser <andre.nusser@googlemail.com> | 2020-04-10 18:17:51 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2020-04-10 19:08:26 +0200 |
commit | 33f1c0443680bc77ab3edfde19fd70dc6661f650 (patch) | |
tree | 5d548b8a14a92d087ed6dca7ed21c83f2134a465 /src/configfile.h | |
parent | d3d333b252925fbc95dd39fe73c5ce12a0017228 (diff) |
Changes after discussion about review on IRC.configfile_refactor
Diffstat (limited to 'src/configfile.h')
-rw-r--r-- | src/configfile.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/configfile.h b/src/configfile.h index a2f8db5..c17811b 100644 --- a/src/configfile.h +++ b/src/configfile.h @@ -39,19 +39,14 @@ public: virtual bool load(); virtual bool save(); - virtual std::string getValue(const std::string& key) const; - virtual void setValue(const std::string& key, const std::string& value); + std::string getValue(const std::string& key) const; + void setValue(const std::string& key, const std::string& value); protected: std::map<std::string, std::string> values; std::string filename; std::fstream current_file; - // TODO: Does this have to be virtual? - // Response: This is actually the only member function that has to be virtual. - // I find it very ugly that we have any virtual functions in here, but it - // seems that they were made virtual such that we can test this class properly. - // What do you think? Test differently and make it all non-virtual? virtual bool open(std::ios_base::openmode mode); std::string readLine(); bool parseLine(const std::string& line); |