Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-07-31 14:05:28 +0000
committerStijn Buys <ingar@osirion.org>2008-07-31 14:05:28 +0000
commit96521495f8c0070537be42c97f8fcbe55ec3990f (patch)
tree95f73fa059c49ee71510e90a93f344ce46731148 /src/core
parent32317145166988e5f9c65395bfc027aa2d32ed0e (diff)
most love valgrind
Diffstat (limited to 'src/core')
-rw-r--r--src/core/cvar.cc8
-rw-r--r--src/core/cvar.h10
-rw-r--r--src/core/module.cc7
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()