diff options
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/dye.cpp | 2 | ||||
-rw-r--r-- | src/resources/image.cpp | 2 | ||||
-rw-r--r-- | src/resources/image.h | 2 | ||||
-rw-r--r-- | src/resources/itemdb.cpp | 6 | ||||
-rw-r--r-- | src/resources/iteminfo.h | 2 |
5 files changed, 6 insertions, 8 deletions
diff --git a/src/resources/dye.cpp b/src/resources/dye.cpp index 92c830dc..d594299c 100644 --- a/src/resources/dye.cpp +++ b/src/resources/dye.cpp @@ -134,7 +134,7 @@ void DyePalette::getColor(int intensity, int color[3]) const void DyePalette::getColor(double intensity, int color[3]) const { // Nothing to do here - if (mColors.size() == 0) + if (mColors.empty()) return; // Force range diff --git a/src/resources/image.cpp b/src/resources/image.cpp index ecf6a6be..328ea9b8 100644 --- a/src/resources/image.cpp +++ b/src/resources/image.cpp @@ -111,7 +111,7 @@ Resource *Image::load(SDL_RWops *rw) return image; } -Resource *Image::load(SDL_RWops *rw, Dye const &dye) +Resource *Image::load(SDL_RWops *rw, const Dye &dye) { SDL_Surface *tmpImage = IMG_Load_RW(rw, 1); diff --git a/src/resources/image.h b/src/resources/image.h index f91d2275..e2e240c3 100644 --- a/src/resources/image.h +++ b/src/resources/image.h @@ -71,7 +71,7 @@ class Image : public Resource * @return <code>NULL</code> if an error occurred, a valid pointer * otherwise. */ - static Resource *load(SDL_RWops *rw, Dye const &dye); + static Resource *load(SDL_RWops *rw, const Dye &dye); /** * Loads an image from an SDL surface. diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp index 6ff3f58c..8ba80a51 100644 --- a/src/resources/itemdb.cpp +++ b/src/resources/itemdb.cpp @@ -236,9 +236,8 @@ void ItemDB::loadCommonRef(ItemInfo *itemInfo, xmlNodePtr node, const std::strin { if (xmlStrEqual(itemChild->name, BAD_CAST "sprite")) { - std::string attackParticle = XML::getProperty( - itemChild, "particle-effect", ""); - itemInfo->mParticle = attackParticle; + itemInfo->mParticle = XML::getProperty( + itemChild, "particle-effect", std::string()); loadSpriteRef(itemInfo, itemChild); } @@ -272,7 +271,6 @@ void ItemDB::addItem(ItemInfo *itemInfo) else logger->log("ItemDB: Duplicate name (%s) for item id %d found.", temp.c_str(), itemInfo->mId); - } } diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h index 5922b6c1..c3a15376 100644 --- a/src/resources/iteminfo.h +++ b/src/resources/iteminfo.h @@ -91,7 +91,7 @@ class ItemInfo const std::string &getName() const { return mName; } - std::string getParticleEffect() const + const std::string &getParticleEffect() const { return mParticle; } const SpriteDisplay &getDisplay() const |