diff options
author | maximius <none@none> | 2009-10-17 15:35:07 -0700 |
---|---|---|
committer | maximius <none@none> | 2009-10-17 15:35:07 -0700 |
commit | 26b5e033ffde3d161382fc9addbfa99738379641 (patch) | |
tree | a344f369ca32945f787a02dee35c3dbe342bed7e /src/shared/Config/Config.cpp | |
parent | f21f47005dcb6b76e1abc9f35fbcd03eed191bff (diff) |
*Massive cleanup (\n\n -> \n, *\n -> \n, cleanup for(...) to for (...), and some other cleanups by hand)
*Fix a possible crash in Spell::DoAllEffectOnTarget
--HG--
branch : trunk
Diffstat (limited to 'src/shared/Config/Config.cpp')
-rw-r--r-- | src/shared/Config/Config.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/shared/Config/Config.cpp b/src/shared/Config/Config.cpp index b56b804b50a..5636e17fd6d 100644 --- a/src/shared/Config/Config.cpp +++ b/src/shared/Config/Config.cpp @@ -17,49 +17,38 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - #include "ConfigEnv.h" #include "Policies/SingletonImp.h" - INSTANTIATE_SINGLETON_1(Config); - Config::Config() : mIgnoreCase(true), mConf(NULL) { } - Config::~Config() { delete mConf; } - bool Config::SetSource(const char *file, bool ignorecase) { mIgnoreCase = ignorecase; mFilename = file; - return Reload(); } - bool Config::Reload() { delete mConf; - mConf = new DOTCONFDocument(mIgnoreCase ? DOTCONFDocument::CASEINSENSETIVE : DOTCONFDocument::CASESENSETIVE); - if (mConf->setContent(mFilename.c_str()) == -1) { delete mConf; mConf = NULL; return false; } - return true; } - std::string Config::GetStringDefault(const char * name, std::string def) { if(!mConf) @@ -69,7 +58,6 @@ std::string Config::GetStringDefault(const char * name, std::string def) return std::string(def); return std::string(node->getValue()); }; - bool Config::GetBoolDefault(const char * name, const bool def) { if(!mConf) @@ -85,7 +73,6 @@ bool Config::GetBoolDefault(const char * name, const bool def) else return false; }; - int32 Config::GetIntDefault(const char * name, const int32 def) { if(!mConf) @@ -95,7 +82,6 @@ int32 Config::GetIntDefault(const char * name, const int32 def) return def; return atoi(node->getValue()); }; - float Config::GetFloatDefault(const char * name, const float def) { if(!mConf) |