diff options
Diffstat (limited to 'src/core/cvar.h')
-rw-r--r-- | src/core/cvar.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/cvar.h b/src/core/cvar.h index 7aab5d3..b8e406c 100644 --- a/src/core/cvar.h +++ b/src/core/cvar.h @@ -61,6 +61,9 @@ public: Cvar &operator=(float other); /* ---- Static functions for the Cvar registry -------------------- */ + + /// type definition for the Cvar registry + typedef std::map<std::string, Cvar*> Registry; /// get a cvar value from the registry /** If the a cvar with the given name already exists in the registry, @@ -104,10 +107,7 @@ public: static void list(); /// the Cvar registry - static std::map<std::string, Cvar*> registry; - - /// an iterator for the Cvar registry - typedef std::map<std::string, Cvar*>::iterator iterator; + static inline Registry & registry() { return cvar_registry; } static Cvar *sv_dedicated; // dedicated server static Cvar *sv_private; // client with private server @@ -133,6 +133,8 @@ private: unsigned int cvar_flags; float cvar_value; + static Registry cvar_registry; + }; } |