From e2150d04662a4ba8b5304dabcc74be0bacded5b7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 15 Jan 2011 01:07:47 +0200 Subject: Fix code style, apply some fixes after checking with cppcheck from git. --- src/resources/emotedb.cpp | 2 +- src/resources/itemdb.cpp | 5 +++-- src/resources/iteminfo.h | 4 ++-- src/resources/wallpaper.cpp | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) (limited to 'src/resources') diff --git a/src/resources/emotedb.cpp b/src/resources/emotedb.cpp index 4d0ba34b4..b786182da 100644 --- a/src/resources/emotedb.cpp +++ b/src/resources/emotedb.cpp @@ -158,7 +158,7 @@ void EmoteDB::unload() { for (EmoteInfos::const_iterator i = mEmoteInfos.begin(); i != mEmoteInfos.end(); - i++) + ++i) { while (!i->second->sprites.empty()) { diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp index 3f17c22ad..e2775c8e8 100644 --- a/src/resources/itemdb.cpp +++ b/src/resources/itemdb.cpp @@ -205,7 +205,8 @@ void ItemDB::load() std::string drawAfter = XML::getProperty(node, "drawAfter", ""); std::string tags[3]; - tags[0] = XML::getProperty(node, "tag", XML::getProperty(node, "tag1", "")); + tags[0] = XML::getProperty(node, "tag", + XML::getProperty(node, "tag1", "")); tags[1] = XML::getProperty(node, "tag2", ""); tags[2] = XML::getProperty(node, "tag3", ""); @@ -269,7 +270,7 @@ void ItemDB::load() effect += strprintf(gettext(fields[i][1]), value); } for (std::list::iterator it = extraStats.begin(); - it != extraStats.end(); it++) + it != extraStats.end(); ++it) { int value = XML::getProperty(node, it->tag.c_str(), 0); if (!value) diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h index 19bba335d..25a30407a 100644 --- a/src/resources/iteminfo.h +++ b/src/resources/iteminfo.h @@ -207,7 +207,7 @@ class ItemInfo void setDrawPriority(int n) { mDrawPriority = n; } - std::map getTags() + std::map getTags() const { return mTags; } void addTag(int tag) @@ -243,7 +243,7 @@ class ItemInfo /** Stores the names of sounds to be played at certain event. */ std::map < EquipmentSoundEvent, std::vector > mSounds; - std::map mTags; + std::map mTags; }; #endif diff --git a/src/resources/wallpaper.cpp b/src/resources/wallpaper.cpp index d3ccef38b..3301478e2 100644 --- a/src/resources/wallpaper.cpp +++ b/src/resources/wallpaper.cpp @@ -139,7 +139,7 @@ std::string Wallpaper::getWallpaper(int width, int height) // Wallpaper filename container std::vector wallPaperVector; - for (iter = wallpaperData.begin(); iter != wallpaperData.end(); iter++) + for (iter = wallpaperData.begin(); iter != wallpaperData.end(); ++iter) { wp = *iter; if (wp.width <= width && wp.height <= height) -- cgit v1.2.3-70-g09d2