diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-02-10 23:35:30 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-02-10 23:35:30 +0100 |
commit | 8712ce09e8f3a86dcf2f6c8ee7d030e3b41a4618 (patch) | |
tree | 3588c5990b6e5d6a0616442cb5bb4a4a76daff65 /src/player.cpp | |
parent | fadc53015b35b6b51313fb1c1debea82e85b8110 (diff) | |
download | mana-8712ce09e8f3a86dcf2f6c8ee7d030e3b41a4618.tar.gz mana-8712ce09e8f3a86dcf2f6c8ee7d030e3b41a4618.tar.bz2 mana-8712ce09e8f3a86dcf2f6c8ee7d030e3b41a4618.tar.xz mana-8712ce09e8f3a86dcf2f6c8ee7d030e3b41a4618.zip |
Use string::empty() instead of comparing to ""
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) |