diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-02-10 23:35:30 +0100 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-02-10 20:26:01 -0700 |
commit | ff1205d2b89f7f2273a32176c746f36836d7bfa9 (patch) | |
tree | 9174cd93bbc3445b027a04637f76b67948a85eab /src/player.cpp | |
parent | d99b00a149e7828adb3c4651069483e51b0b458b (diff) | |
download | mana-ff1205d2b89f7f2273a32176c746f36836d7bfa9.tar.gz mana-ff1205d2b89f7f2273a32176c746f36836d7bfa9.tar.bz2 mana-ff1205d2b89f7f2273a32176c746f36836d7bfa9.tar.xz mana-ff1205d2b89f7f2273a32176c746f36836d7bfa9.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 0eea8a6a..5256831b 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -170,11 +170,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) |