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/being.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/being.cpp')
-rw-r--r-- | src/being.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/being.cpp b/src/being.cpp index 521947e3..565eb35f 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -221,7 +221,7 @@ void Being::setSpeech(const std::string &text, Uint32 time) end = mSpeech.find(']', start); } - if (mSpeech != "") + if (!mSpeech.empty()) mSpeechTime = time <= SPEECH_MAX_TIME ? time : SPEECH_MAX_TIME; } @@ -756,14 +756,14 @@ void Being::internalTriggerEffect(int effectId, bool sfx, bool gfx) return; } - if (gfx && ed->mGFXEffect != "") { + if (gfx && !ed->mGFXEffect.empty()) { Particle *selfFX; selfFX = particleEngine->addEffect(ed->mGFXEffect, 0, 0); controlParticle(selfFX); } - if (sfx && ed->mSFXEffect != "") { + if (sfx && !ed->mSFXEffect.empty()) { sound.playSfx(ed->mSFXEffect); } } @@ -831,7 +831,7 @@ static void initializeHair() int index = atoi(XML::getProperty(node, "id", "-1").c_str()); std::string value = XML::getProperty(node, "value", ""); - if (index >= 0 && value != "") { + if (index >= 0 && !value.empty()) { if (index >= hairColorsNr) { hairColorsNr = index + 1; hairColors.resize(hairColorsNr, "#000000"); |