diff options
| author | Markus Mittendrein <git@maxmitti.tk> | 2018-08-19 23:33:23 +0200 |
|---|---|---|
| committer | Markus Mittendrein <git@maxmitti.tk> | 2018-08-19 23:33:23 +0200 |
| commit | 775c1d431d55e735be9516d84b583f4a956d8d7a (patch) | |
| tree | 26f2cc5dc11b504361883d7e3cfdf93ac93958a4 /src/CRSMConfig.hpp | |
| parent | 8e6f1d76e680194f329841a175c1f2d5d06ccd53 (diff) | |
| download | manager-775c1d431d55e735be9516d84b583f4a956d8d7a.tar.gz manager-775c1d431d55e735be9516d84b583f4a956d8d7a.zip | |
Use ClearableConfigBase instead of implementing clear() several times
Diffstat (limited to 'src/CRSMConfig.hpp')
| -rw-r--r-- | src/CRSMConfig.hpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/CRSMConfig.hpp b/src/CRSMConfig.hpp index 9845ef0..c9b4ade 100644 --- a/src/CRSMConfig.hpp +++ b/src/CRSMConfig.hpp @@ -3,7 +3,7 @@ #include "qt-config/ConfigBase.hpp" #include "GreetingSetting.hpp" -class CRSMConfig : public ConfigBase { +class CRSMConfig : public ClearableConfigBase<CRSMConfig> { public: struct { Port ManagementPort = 9372; @@ -114,7 +114,7 @@ public: Integer RereadLimit = 50; } Readline; - explicit CRSMConfig() : ConfigBase({ + explicit CRSMConfig() : ClearableConfigBase<CRSMConfig>({ ConfigVal(CRSM.ManagementPort), ConfigVal(CRSM.ListFolder), ConfigVal(CRSM.CommandSigns), @@ -201,11 +201,4 @@ public: ConfigVal(Readline.PromptEnabled), ConfigVal(Readline.RereadLimit) }) {} - - void clear() - { - auto configVals = configValues; - *this = CRSMConfig(); - configValues = configVals; - } }; |
