Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-07-28 19:37:31 +0000
committerStijn Buys <ingar@osirion.org>2008-07-28 19:37:31 +0000
commitd389a31f9816b55d8c7685ec24b9ab814252d693 (patch)
tree9b2577692e543fa6c59fcda508f92c3eb839ac7a /src/core/cvar.h
parent17408276791033e8122819185abf3bcb01740105 (diff)
zone support
Diffstat (limited to 'src/core/cvar.h')
-rw-r--r--src/core/cvar.h10
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;
+
};
}