From 4cea2a5cd85b8d3ad905eb3b337b28284c62d4fe Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 8 Nov 2011 00:44:17 +0300 Subject: Fix more gcc 4.7 warnings. --- src/resources/iteminfo.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/resources/iteminfo.cpp') 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 *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) -- cgit v1.2.3-60-g2f50