diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-02-11 00:01:36 +0100 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-02-10 20:19:45 -0700 |
commit | d99b00a149e7828adb3c4651069483e51b0b458b (patch) | |
tree | 33f07f9d18dd006d10b14ff2dffbcbe337809d0c /src/being.cpp | |
parent | d268447e18c6e3edd80658f8f8d4317740c33af9 (diff) | |
download | mana-d99b00a149e7828adb3c4651069483e51b0b458b.tar.gz mana-d99b00a149e7828adb3c4651069483e51b0b458b.tar.bz2 mana-d99b00a149e7828adb3c4651069483e51b0b458b.tar.xz mana-d99b00a149e7828adb3c4651069483e51b0b458b.zip |
Removed many pointless comparisons with NULL
Sometimes it's nice for clarity, but most of the time this is just
clutter. C++ != Java. :)
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 1acbdb50..7a7f3df7 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -344,8 +344,8 @@ void Being::setDirection(Uint8 direction) for (int i = 0; i < VECTOREND_SPRITE; i++) { - if (mSprites[i] != NULL) - mSprites[i]->setDirection(dir); + if (mSprites[i]) + mSprites[i]->setDirection(dir); } } @@ -446,7 +446,7 @@ void Being::logic() for (int i = 0; i < VECTOREND_SPRITE; i++) { - if (mSprites[i] != NULL) + if (mSprites[i]) mSprites[i]->update(tick_time * 10); } @@ -468,7 +468,7 @@ void Being::draw(Graphics *graphics, int offsetX, int offsetY) const for (int i = 0; i < VECTOREND_SPRITE; i++) { - if (mSprites[i] != NULL) + if (mSprites[i]) { mSprites[i]->draw(graphics, px, py); } |