diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-07-17 23:26:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-07-17 23:26:59 +0300 |
commit | 7e0a97d2521b9ce57003176e82a0b5564aa003c2 (patch) | |
tree | 5b2cfe1afe09bea1063f783050c1fb549daee76d /src/configuration.cpp | |
parent | f68cbf700a99f2f184715a5b8025bcb4b6525391 (diff) | |
download | ManaVerse-7e0a97d2521b9ce57003176e82a0b5564aa003c2.tar.gz ManaVerse-7e0a97d2521b9ce57003176e82a0b5564aa003c2.tar.bz2 ManaVerse-7e0a97d2521b9ce57003176e82a0b5564aa003c2.tar.xz ManaVerse-7e0a97d2521b9ce57003176e82a0b5564aa003c2.zip |
Fix more code style and additional warnings.
Diffstat (limited to 'src/configuration.cpp')
-rw-r--r-- | src/configuration.cpp | 9 |
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 |