diff --git a/config.cpp b/config.cpp index 9e45635b..4f7ecbc1 100644 --- a/config.cpp +++ b/config.cpp @@ -243,7 +243,7 @@ struct custom_setting : public setting { function custom_affect; void show_edit_option(int key) override { custom_viewer(key); } cld get_cld() override { return custom_value(); } - supersaver *make_saver() override; + supersaver *make_saver() { throw hr_exception("make_saver for custom_setting"); } void set_cld(cld x) override { } bool affects(void *v) override { return custom_affect(v); } }; @@ -354,30 +354,6 @@ template<> struct saver : dsaver { virtual void swap_with(supersaver *s) { swap(val, ((saver*)s)->val); } }; -template<> struct saver : dsaver { - explicit saver(eVariation& val) : dsaver(val) { } - string save() override { return its((int) val); } - void load(const string& s) override { val = (eVariation) atoi(s.c_str()); } - virtual void clone(struct local_parameter_set& lps, void *value) override { addsaverenum(*(eVariation*) value, lps.label + name); } - virtual void swap_with(supersaver *s) { swap(val, ((saver*)s)->val); } - }; - -template<> struct saver : dsaver { - explicit saver(eGeometry& val) : dsaver(val) { } - string save() override { return its((int) val); } - void load(const string& s) override { val = (eGeometry) atoi(s.c_str()); } - virtual void clone(struct local_parameter_set& lps, void *value) override { addsaverenum(*(eGeometry*) value, lps.label + name); } - virtual void swap_with(supersaver *s) { swap(val, ((saver*)s)->val); } - }; - -template<> struct saver : dsaver { - explicit saver(eModel& val) : dsaver(val) { } - string save() override { return its((int) val); } - void load(const string& s) override { val = (eModel) atoi(s.c_str()); } - virtual void clone(struct local_parameter_set& lps, void *value) override { addsaverenum(*(eModel*) value, lps.label + name); } - virtual void swap_with(supersaver *s) { swap(val, ((saver*)s)->val); } - }; - template<> struct saver : dsaver { explicit saver(string& val) : dsaver(val) { } string save() override { return val; }