diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-11-08 00:44:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-11-08 00:44:17 +0300 |
commit | 4cea2a5cd85b8d3ad905eb3b337b28284c62d4fe (patch) | |
tree | 714897eca03fbcb764f5b450a29cc1aef8d33433 /src/resources/iteminfo.cpp | |
parent | 9e83411f7e4147d09af5a5006888dcc187ea0ef8 (diff) | |
download | plus-4cea2a5cd85b8d3ad905eb3b337b28284c62d4fe.tar.gz plus-4cea2a5cd85b8d3ad905eb3b337b28284c62d4fe.tar.bz2 plus-4cea2a5cd85b8d3ad905eb3b337b28284c62d4fe.tar.xz plus-4cea2a5cd85b8d3ad905eb3b337b28284c62d4fe.zip |
Fix more gcc 4.7 warnings.
Diffstat (limited to 'src/resources/iteminfo.cpp')
-rw-r--r-- | src/resources/iteminfo.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp index 5b07724a1..dfcff3f76 100644 --- a/src/resources/iteminfo.cpp +++ b/src/resources/iteminfo.cpp @@ -77,14 +77,14 @@ ItemInfo::ItemInfo() : mAttackAction(SpriteAction::INVALID), mAttackRange(0), mMissileParticle(""), - mColors(0), + mColors(nullptr), mColorList(""), mHitEffectId(0), mCriticalHitEffectId(0) { for (int f = 0; f < 9; f ++) { - mSpriteToItemReplaceMap[f] = 0; + mSpriteToItemReplaceMap[f] = nullptr; mDrawBefore[f] = -1; mDrawAfter[f] = -1; mDrawPriority[f] = 0; @@ -96,7 +96,7 @@ ItemInfo::~ItemInfo() delete_all(mSpriteToItemReplaceList); mSpriteToItemReplaceList.clear(); for (int f = 0; f < 9; f ++) - mSpriteToItemReplaceMap[f] = 0; + mSpriteToItemReplaceMap[f] = nullptr; } const std::string &ItemInfo::getSprite(Gender gender) const @@ -145,7 +145,7 @@ const std::string &ItemInfo::getSound(EquipmentSoundEvent event) const std::map<int, int> *ItemInfo::addReplaceSprite(int sprite, int direction) { if (direction < 0 || direction >= 9) - return 0; + return nullptr; SpriteToItemMap *spMap = mSpriteToItemReplaceMap[direction]; @@ -170,7 +170,7 @@ void ItemInfo::setColorsList(std::string name) { if (name.empty()) { - mColors = 0; + mColors = nullptr; mColorList = ""; } else @@ -231,7 +231,7 @@ const std::string ItemInfo::replaceColors(std::string str, SpriteToItemMap *ItemInfo::getSpriteToItemReplaceMap(int direction) const { if (direction < 0 || direction >= 9) - return 0; + return nullptr; SpriteToItemMap *spMap = mSpriteToItemReplaceMap[direction]; if (spMap) @@ -242,7 +242,7 @@ SpriteToItemMap *ItemInfo::getSpriteToItemReplaceMap(int direction) const if (direction == DIRECTION_DOWNLEFT || direction == DIRECTION_DOWNRIGHT) return mSpriteToItemReplaceMap[DIRECTION_DOWN]; - return 0; + return nullptr; } void ItemInfo::setSpriteOrder(int *ptr, int direction, int n, int def) |