summaryrefslogtreecommitdiff
path: root/src/configuration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/configuration.cpp')
-rw-r--r--src/configuration.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/configuration.cpp b/src/configuration.cpp
index 684468997..defa38812 100644
--- a/src/configuration.cpp
+++ b/src/configuration.cpp
@@ -507,8 +507,9 @@ float Configuration::getFloatValue(const std::string &key) const
else if (itdef->second->getType()
== VariableData::DATA_STRING)
{
- defaultValue = atof((static_cast<StringData*>(
- itdef->second))->getData().c_str());
+ defaultValue = static_cast<float>(atof((
+ static_cast<StringData*>(
+ itdef->second))->getData().c_str()));
}
else if (itdef->second->getType()
== VariableData::DATA_BOOL)
@@ -526,8 +527,8 @@ float Configuration::getFloatValue(const std::string &key) const
else if (itdef->second->getType()
== VariableData::DATA_INT)
{
- defaultValue = (static_cast<IntData*>(
- itdef->second))->getData();
+ defaultValue = static_cast<float>((static_cast<IntData*>(
+ itdef->second))->getData());
}
}
else