summaryrefslogtreecommitdiff
path: root/src/being/playerrelations.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-07 16:18:13 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-07 16:18:13 +0300
commit9fe21fcd8883b37bdc30224822e6e42afb35b8f0 (patch)
tree798117abd4dc7e610997d59d530a96ddc1509f53 /src/being/playerrelations.cpp
parent4429cb14e9e187edef27aba692a4266733f79c17 (diff)
downloadmanaverse-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.gz
manaverse-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.bz2
manaverse-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.xz
manaverse-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.zip
Replace most static_cast<Type> to shorter versions from defines.
Diffstat (limited to 'src/being/playerrelations.cpp')
-rw-r--r--src/being/playerrelations.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/being/playerrelations.cpp b/src/being/playerrelations.cpp
index d124ba1dd..d996b03e3 100644
--- a/src/being/playerrelations.cpp
+++ b/src/being/playerrelations.cpp
@@ -86,7 +86,7 @@ namespace
return nullptr;
cobj->setValue(NAME, value.first);
cobj->setValue(RELATION, toString(
- static_cast<int>(value.second->mRelation)));
+ CAST_S32(value.second->mRelation)));
return cobj;
}
@@ -105,7 +105,7 @@ namespace
if (!(*container)[name])
{
const int v = cobj->getValueInt(RELATION,
- static_cast<int>(Relation::NEUTRAL));
+ CAST_S32(Relation::NEUTRAL));
(*container)[name] = new PlayerRelation(
static_cast<RelationT>(v));
@@ -175,7 +175,7 @@ int PlayerRelationsManager::getPlayerIgnoreStrategyIndex(
for (size_t i = 0; i < sz; i++)
{
if ((*strategies)[i]->mShortName == name)
- return static_cast<int>(i);
+ return CAST_S32(i);
}
return -1;
@@ -191,7 +191,7 @@ void PlayerRelationsManager::load(const bool oldConfig)
clear();
mPersistIgnores = cfg->getValue(PERSIST_IGNORE_LIST, 1);
- mDefaultPermissions = static_cast<int>(cfg->getValue(DEFAULT_PERMISSIONS,
+ mDefaultPermissions = CAST_S32(cfg->getValue(DEFAULT_PERMISSIONS,
mDefaultPermissions));
const std::string ignore_strategy_name = cfg->getValue(
@@ -271,7 +271,7 @@ unsigned int PlayerRelationsManager::checkPermissionSilently(
{
const PlayerRelation *const r = (*it).second;
unsigned int permissions = PlayerRelation::RELATION_PERMISSIONS[
- static_cast<int>(r->mRelation)];
+ CAST_S32(r->mRelation)];
switch (r->mRelation)
{