diff options
Diffstat (limited to 'src/player.cpp')
-rw-r--r-- | src/player.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/player.cpp b/src/player.cpp index 610dfeb1..a2a263b3 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -169,11 +169,12 @@ void Player::setSprite(int slot, int id, std::string color) std::string filename = ItemDB::get(id).getSprite(mGender); AnimatedSprite *equipmentSprite = NULL; - if (filename != "") + if (!filename.empty()) { - if (color!="") filename += "|" + color; + if (!color.empty()) + filename += "|" + color; equipmentSprite = AnimatedSprite::load( - "graphics/sprites/" + filename); + "graphics/sprites/" + filename); } if (equipmentSprite) |