diff options
author | Alexander Baldeck <alexander@archlinux.org> | 2004-12-29 12:29:58 +0000 |
---|---|---|
committer | Alexander Baldeck <alexander@archlinux.org> | 2004-12-29 12:29:58 +0000 |
commit | 8fe800f7afa25e052c387b8a1a7ad6d46f38d916 (patch) | |
tree | ca0f0bf3ef5f556caa3b82f77b9691680182c799 /src/configuration.cpp | |
parent | ff208227c9dcda7a8279acc8ee43fa28ea284478 (diff) | |
download | mana-client-8fe800f7afa25e052c387b8a1a7ad6d46f38d916.tar.gz mana-client-8fe800f7afa25e052c387b8a1a7ad6d46f38d916.tar.bz2 mana-client-8fe800f7afa25e052c387b8a1a7ad6d46f38d916.tar.xz mana-client-8fe800f7afa25e052c387b8a1a7ad6d46f38d916.zip |
- ported sound engine to SDL_Mixer
- name change from TmwSound to Sound as required by HACKING.txt
- slight modification of other files using it due to interface changes
- minor speedups in Configuration
- makefile.static modfified to link against SDL
Diffstat (limited to 'src/configuration.cpp')
-rw-r--r-- | src/configuration.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/configuration.cpp b/src/configuration.cpp index a7f07aeb..4debdb16 100644 --- a/src/configuration.cpp +++ b/src/configuration.cpp @@ -100,7 +100,9 @@ bool Configuration::write(std::string filename) { out.write(tmp, strlen(tmp)); strcpy(tmp, ""); } - std::cout << "Configuration::write(" << optionTmp.key << ", \"" << optionTmp.stringValue << "\" / " << optionTmp.numericValue << ")\n"; + #ifdef __DEBUG + std::cout << "Configuration::write(" << optionTmp.key << ", \"" << optionTmp.stringValue << "\" / " << optionTmp.numericValue << ")\n"; + #endif out.write("\n", 1); } @@ -163,11 +165,9 @@ void Configuration::setValue(std::string key, float value) { \param deflt default option if not there or error */ std::string Configuration::getValue(std::string key, std::string deflt) { - for (iter = iniOptions.begin(); iter != iniOptions.end(); iter++) { - if(iter->key == key) - return iter->stringValue; + if(keyExists(key)) { + return iter->stringValue; } - return deflt; } @@ -177,11 +177,9 @@ std::string Configuration::getValue(std::string key, std::string deflt) { \param deflt default option if not there or error */ float Configuration::getValue(std::string key, float deflt) { - for (iter = iniOptions.begin(); iter != iniOptions.end(); iter++) { - if(iter->key == key) - return iter->numericValue; + if(keyExists(key)) { + return iter->numericValue; } - return deflt; } |