summaryrefslogtreecommitdiff
path: root/src/configuration.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2010-09-27 22:40:40 +0200
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2010-09-27 22:40:40 +0200
commit6f25f5d9390ae247970ad886dc51d55435285831 (patch)
treee5c748d1e5598cdd658741a4b35890cec636d37a /src/configuration.cpp
parent661d16e98c62dfff40f481177bf3f1a0c58c2124 (diff)
downloadmana-6f25f5d9390ae247970ad886dc51d55435285831.tar.gz
mana-6f25f5d9390ae247970ad886dc51d55435285831.tar.bz2
mana-6f25f5d9390ae247970ad886dc51d55435285831.tar.xz
mana-6f25f5d9390ae247970ad886dc51d55435285831.zip
Centralized String to bool conversion into the client.
The former XML::getBoolProperty() had a potential memleak and was unsafe when dealing with unknown values. Reviewed-by: CodyMartin. Resolves: Mana-Mantis #213.
Diffstat (limited to 'src/configuration.cpp')
-rw-r--r--src/configuration.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/configuration.cpp b/src/configuration.cpp
index 6ccef401..50d76bfb 100644
--- a/src/configuration.cpp
+++ b/src/configuration.cpp
@@ -221,7 +221,7 @@ bool Configuration::getBoolValue(const std::string &key) const
}
else
{
- defaultValue = getBoolFromString(iter->second);
+ return getBoolFromString(iter->second, defaultValue);
}
return defaultValue;