summaryrefslogtreecommitdiff
path: root/src/configuration.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2006-03-19 20:43:10 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2006-03-19 20:43:10 +0000
commit654d24e74c56d240b8d622840c135e22a029636d (patch)
tree5eb8b94f7832bdbb6d21c7ded6e6da6b5f8f3464 /src/configuration.cpp
parent3ddaec5f355ed1d231514cf0a863c4b9e35cf2a6 (diff)
downloadmana-654d24e74c56d240b8d622840c135e22a029636d.tar.gz
mana-654d24e74c56d240b8d622840c135e22a029636d.tar.bz2
mana-654d24e74c56d240b8d622840c135e22a029636d.tar.xz
mana-654d24e74c56d240b8d622840c135e22a029636d.zip
Unreverted latest change by Doener due to my lack of proper communication abilities.
Diffstat (limited to 'src/configuration.cpp')
-rw-r--r--src/configuration.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/configuration.cpp b/src/configuration.cpp
index aa63f46c..4085b20b 100644
--- a/src/configuration.cpp
+++ b/src/configuration.cpp
@@ -24,12 +24,13 @@
#include "configuration.h"
-#include <sstream>
#include <libxml/xmlwriter.h>
#include "configlistener.h"
#include "log.h"
+#include "utils/tostring.h"
+
void Configuration::init(const std::string &filename)
{
mConfigPath = filename;
@@ -127,9 +128,7 @@ void Configuration::setValue(const std::string &key, std::string value)
void Configuration::setValue(const std::string &key, float value)
{
- std::stringstream ss;
- ss << ((value == (int)value) ? (int)value : value);
- setValue(key, ss.str());
+ setValue(key, toString((value == (int)value) ? (int)value : value));
}
std::string Configuration::getValue(const std::string &key, std::string deflt)