summaryrefslogtreecommitdiff
path: root/src/configuration.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-03-18 14:47:14 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-03-18 14:47:14 +0000
commitab678324e3d73e2354cef331624ecef7cfc03203 (patch)
tree29394a5aca6e59f817f7cfa3b9281891a273d259 /src/configuration.cpp
parent32badd4b6f843cb74fdc3238fe92119518c8c0ab (diff)
downloadmana-client-ab678324e3d73e2354cef331624ecef7cfc03203.tar.gz
mana-client-ab678324e3d73e2354cef331624ecef7cfc03203.tar.bz2
mana-client-ab678324e3d73e2354cef331624ecef7cfc03203.tar.xz
mana-client-ab678324e3d73e2354cef331624ecef7cfc03203.zip
Added a toString conversion function.
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)