summaryrefslogtreecommitdiff
path: root/src/configuration.cpp
diff options
context:
space:
mode:
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)