diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-08-21 22:44:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-08-21 22:45:15 +0300 |
commit | 42f47e483da19079a937c4801ca94bd62d8dc970 (patch) | |
tree | 56dc96737e01e04d54357ce7118de3a1f000c516 /src/being/playerinfo.cpp | |
parent | 2d8b9246c8003f1d32ba396bc19cc11bc5a595b2 (diff) | |
download | ManaVerse-42f47e483da19079a937c4801ca94bd62d8dc970.tar.gz ManaVerse-42f47e483da19079a937c4801ca94bd62d8dc970.tar.bz2 ManaVerse-42f47e483da19079a937c4801ca94bd62d8dc970.tar.xz ManaVerse-42f47e483da19079a937c4801ca94bd62d8dc970.zip |
Remove useless else.
Diffstat (limited to 'src/being/playerinfo.cpp')
-rw-r--r-- | src/being/playerinfo.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/being/playerinfo.cpp b/src/being/playerinfo.cpp index 9f1514243..33541a465 100644 --- a/src/being/playerinfo.cpp +++ b/src/being/playerinfo.cpp @@ -92,8 +92,7 @@ int getAttribute(const AttributesT id) const AtrIntMap::const_iterator it = mData.mAttributes.find(id); if (it != mData.mAttributes.end()) return it->second; - else - return 0; + return 0; } void setAttribute(const AttributesT id, @@ -111,8 +110,7 @@ int getSkillLevel(const int id) const IntMap::const_iterator it = mData.mSkills.find(id); if (it != mData.mSkills.end()) return it->second; - else - return 0; + return 0; } void setSkillLevel(const int id, const int value) @@ -127,8 +125,7 @@ int getStatBase(const AttributesT id) const StatMap::const_iterator it = mData.mStats.find(id); if (it != mData.mStats.end()) return it->second.base; - else - return 0; + return 0; } void setStatBase(const AttributesT id, const int value, const Notify notify) @@ -144,8 +141,7 @@ int getStatMod(const AttributesT id) const StatMap::const_iterator it = mData.mStats.find(id); if (it != mData.mStats.end()) return it->second.mod; - else - return 0; + return 0; } void setStatMod(const AttributesT id, const int value, const Notify notify) @@ -161,8 +157,7 @@ int getStatEffective(const AttributesT id) const StatMap::const_iterator it = mData.mStats.find(id); if (it != mData.mStats.end()) return it->second.base + it->second.mod; - else - return 0; + return 0; } const std::pair<int, int> getStatExperience(const AttributesT id) @@ -233,8 +228,7 @@ const Item *getEquipment(const unsigned int slot) { if (mEquipment != nullptr) return mEquipment->getEquipment(slot); - else - return nullptr; + return nullptr; } void setEquipmentBackend(Equipment::Backend *const backend) |