From 654d24e74c56d240b8d622840c135e22a029636d Mon Sep 17 00:00:00 2001 From: Eugenio Favalli Date: Sun, 19 Mar 2006 20:43:10 +0000 Subject: Unreverted latest change by Doener due to my lack of proper communication abilities. --- src/configuration.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/configuration.cpp') 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 #include #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) -- cgit v1.2.3-60-g2f50