summaryrefslogtreecommitdiff
path: root/src/configuration.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-18 17:48:29 +0200
committerAndrei Karas <akaras@inbox.ru>2011-03-18 17:49:00 +0200
commitf98d003e354a1792117b7cbc771d1dd91475a156 (patch)
treedc2a297f7c4026394c9954ae4bfd4abd22ef9612 /src/configuration.cpp
parentbb0a6cb25b2985fd1f74c9d27d5a46f6863e2dee (diff)
downloadmv-f98d003e354a1792117b7cbc771d1dd91475a156.tar.gz
mv-f98d003e354a1792117b7cbc771d1dd91475a156.tar.bz2
mv-f98d003e354a1792117b7cbc771d1dd91475a156.tar.xz
mv-f98d003e354a1792117b7cbc771d1dd91475a156.zip
Fix most old style cast except manaserv and libxml2 defines.
Diffstat (limited to 'src/configuration.cpp')
-rw-r--r--src/configuration.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/configuration.cpp b/src/configuration.cpp
index b5f76c4fb..900a22563 100644
--- a/src/configuration.cpp
+++ b/src/configuration.cpp
@@ -179,7 +179,8 @@ int Configuration::getIntValue(const std::string &key) const
if (itdef != mDefaultsData->end() && itdef->second
&& itdef->second->getType() == Mana::VariableData::DATA_INT)
{
- defaultValue = ((Mana::IntData*)itdef->second)->getData();
+ defaultValue = (static_cast<Mana::IntData*>(
+ itdef->second))->getData();
}
else
{
@@ -209,7 +210,8 @@ std::string Configuration::getStringValue(const std::string &key) const
if (itdef != mDefaultsData->end() && itdef->second
&& itdef->second->getType() == Mana::VariableData::DATA_STRING)
{
- defaultValue = ((Mana::StringData*)itdef->second)->getData();
+ defaultValue = (static_cast<Mana::StringData*>(
+ itdef->second))->getData();
}
else
{
@@ -241,7 +243,7 @@ float Configuration::getFloatValue(const std::string &key) const
&& itdef->second->getType() == Mana::VariableData::DATA_FLOAT)
{
defaultValue = static_cast<float>(
- ((Mana::FloatData*)itdef->second)->getData());
+ (static_cast<Mana::FloatData*>(itdef->second))->getData());
}
else
{
@@ -271,7 +273,8 @@ bool Configuration::getBoolValue(const std::string &key) const
if (itdef != mDefaultsData->end() && itdef->second
&& itdef->second->getType() == Mana::VariableData::DATA_BOOL)
{
- defaultValue = ((Mana::BoolData*)itdef->second)->getData();
+ defaultValue = (static_cast<Mana::BoolData*>(
+ itdef->second))->getData();
}
else
{