diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/cvar.cc | 8 | ||||
-rw-r--r-- | src/core/cvar.h | 10 | ||||
-rw-r--r-- | src/core/module.cc | 7 |
3 files changed, 12 insertions, 13 deletions
diff --git a/src/core/cvar.cc b/src/core/cvar.cc index 45f04f3..50043f2 100644 --- a/src/core/cvar.cc +++ b/src/core/cvar.cc @@ -35,7 +35,7 @@ Cvar *Cvar::rconpassword = 0; Cvar::Registry Cvar::cvar_registry; -Cvar::Cvar(const char *name, unsigned int flags) +Cvar::Cvar(const char *name, const unsigned int flags) { cvar_flags = flags; @@ -76,7 +76,7 @@ Cvar & Cvar::operator=(float other) return (*this); } -Cvar* Cvar::get(const char *name, const char *value, unsigned int flags) +Cvar* Cvar::get(const char *name, const char *value, const unsigned int flags) { Cvar *c = find(name); if (c) { @@ -92,7 +92,7 @@ Cvar* Cvar::get(const char *name, const char *value, unsigned int flags) return c; } -Cvar* Cvar::get(const char *name, float value, unsigned int flags) +Cvar* Cvar::get(const char *name, float value, const unsigned int flags) { Cvar *c = find(name); if (c) { @@ -107,7 +107,7 @@ Cvar* Cvar::get(const char *name, float value, unsigned int flags) return c; } -Cvar* Cvar::set(const char *name, const char *value, unsigned int flags) +Cvar* Cvar::set(const char *name, const char *value, const unsigned int flags) { Cvar *c = find(name); if (!c) { diff --git a/src/core/cvar.h b/src/core/cvar.h index b8e406c..d934872 100644 --- a/src/core/cvar.h +++ b/src/core/cvar.h @@ -27,7 +27,7 @@ public: enum Flags {Archive=1, ReadOnly=2, Game=4, Info=8}; /// create a new variable - Cvar(const char *name, unsigned int flags = 0); + Cvar(const char *name, const unsigned int flags = 0); /*----- inspectors ------------------------------------------------ */ @@ -70,26 +70,26 @@ public: * its value will not be changed. If the cvar does not exist, * it will be created */ - static Cvar *get(const char *name, const char *value, unsigned int flags=0); + static Cvar *get(const char *name, const char *value, const unsigned int flags=0); /// get a cvar value from the registry /** If the a cvar with the given name already exists in the registry, * its value will not be changed. If the cvar does not exist, * it will be created */ - static Cvar *get(const char *name, float value, unsigned int flags=0); + static Cvar *get(const char *name, float value, const unsigned int flags=0); /// set a cvar value /** If the a cvar with the given name already exists in the registry, * its value will be replaced */ - static Cvar *set(const char *name, const char *value, unsigned int flags=0); + static Cvar *set(const char *name, const char *value, const unsigned int flags=0); /// set a cvar value /** If the a cvar with the given name already exists in the registry, * its value will be replaced */ - static Cvar *set(const char *name, float value, unsigned int flags=0); + static Cvar *set(const char *name, float value, const unsigned int flags=0); /// delete a cvar from the registry static void unset(const char *name); diff --git a/src/core/module.cc b/src/core/module.cc index 8eef50f..447e2b3 100644 --- a/src/core/module.cc +++ b/src/core/module.cc @@ -9,13 +9,12 @@ namespace core { -Module *Module::module_preload; +Module *Module::module_preload = 0; -Module::Module(const char *name) +Module::Module(const char *name) : + module_name(name) { module_running = false; - module_name.assign(name); - module_preload = 0; } Module::~Module() |