diff -r 3b35f502a6c7 -r ea09eeba1c2b src/config.h --- a/src/config.h Tue May 21 18:56:38 2013 +0300 +++ b/src/config.h Tue May 21 19:07:38 2013 +0300 @@ -26,7 +26,7 @@ #include #define MAX_INI_LINE 512 -#define NUM_CONFIG (g_configPointers.size ()) +#define MAX_CONFIG 512 #define cfg(T, NAME, DEFAULT) \ T##config NAME (DEFAULT, #NAME, #T, #DEFAULT) @@ -63,7 +63,7 @@ static str filepath (); }; -extern std::vector g_configPointers; +void addConfig (config* ptr); // ============================================================================= #define DEFINE_UNARY_OPERATOR(T, OP) \ @@ -118,7 +118,7 @@ name = _name; \ typestring = _typestring; \ defaultstring = _defaultstring; \ - g_configPointers.push_back (this); \ + addConfig (this); \ } \ operator T () { \ return value; \