Tue, 20 Aug 2013 15:01:16 +0300
ensure that all Configs are polymorphic
src/config.cpp | file | annotate | diff | comparison | revisions | |
src/config.h | file | annotate | diff | comparison | revisions |
--- a/src/config.cpp Tue Aug 20 14:56:26 2013 +0300 +++ b/src/config.cpp Tue Aug 20 15:01:16 2013 +0300 @@ -44,6 +44,12 @@ #endif // PORTABLE } +Config::Config (const char* name, const char* defstring) : + name (name), m_defstring (defstring) +{ + assert (getType() != None); +} + // ============================================================================= // ----------------------------------------------------------------------------- // Load the configuration from file
--- a/src/config.h Tue Aug 20 14:56:26 2013 +0300 +++ b/src/config.h Tue Aug 20 15:01:16 2013 +0300 @@ -47,8 +47,7 @@ KeySequence, }; - Config (const char* name, const char* defstring) : - name (name), m_defstring (defstring) {} + Config (const char* name, const char* defstring); const char* name; virtual Type getType() const {