mirror of
https://github.com/mangosfour/server.git
synced 2025-12-21 01:37:05 +00:00
[12062] Cleanup MaNGOS sources
This commit is contained in:
parent
a4cbed3199
commit
aeff8f9d1a
46 changed files with 1982 additions and 1864 deletions
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
INSTANTIATE_SINGLETON_1(Config);
|
||||
|
||||
static bool GetValueHelper(ACE_Configuration_Heap *mConf, const char *name, ACE_TString &result)
|
||||
static bool GetValueHelper(ACE_Configuration_Heap* mConf, const char* name, ACE_TString& result)
|
||||
{
|
||||
if (!mConf)
|
||||
return false;
|
||||
|
|
@ -45,7 +45,7 @@ static bool GetValueHelper(ACE_Configuration_Heap *mConf, const char *name, ACE_
|
|||
}
|
||||
|
||||
Config::Config()
|
||||
: mConf(NULL)
|
||||
: mConf(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ Config::~Config()
|
|||
delete mConf;
|
||||
}
|
||||
|
||||
bool Config::SetSource(const char *file)
|
||||
bool Config::SetSource(const char* file)
|
||||
{
|
||||
mFilename = file;
|
||||
|
||||
|
|
@ -92,8 +92,8 @@ bool Config::GetBoolDefault(const char* name, bool def)
|
|||
|
||||
const char* str = val.c_str();
|
||||
if (strcmp(str, "true") == 0 || strcmp(str, "TRUE") == 0 ||
|
||||
strcmp(str, "yes") == 0 || strcmp(str, "YES") == 0 ||
|
||||
strcmp(str, "1") == 0)
|
||||
strcmp(str, "yes") == 0 || strcmp(str, "YES") == 0 ||
|
||||
strcmp(str, "1") == 0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class MANGOS_DLL_SPEC Config
|
|||
Config();
|
||||
~Config();
|
||||
|
||||
bool SetSource(const char *file);
|
||||
bool SetSource(const char* file);
|
||||
bool Reload();
|
||||
|
||||
std::string GetStringDefault(const char* name, const char* def);
|
||||
|
|
@ -45,7 +45,7 @@ class MANGOS_DLL_SPEC Config
|
|||
private:
|
||||
|
||||
std::string mFilename;
|
||||
ACE_Configuration_Heap *mConf;
|
||||
ACE_Configuration_Heap* mConf;
|
||||
};
|
||||
|
||||
#define sConfig MaNGOS::Singleton<Config>::Instance()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue