aboutsummaryrefslogtreecommitdiff
path: root/src/game/Creature.cpp
diff options
context:
space:
mode:
authorMachiavelli <none@none>2009-06-18 17:21:25 +0200
committerMachiavelli <none@none>2009-06-18 17:21:25 +0200
commit3a309abfab3762d1c3bc2f90b961582e83d5971a (patch)
treeb04ae4230e1d2b67f78e4ce74b0ed6038c62be6d /src/game/Creature.cpp
parent85e59ecd578159a049295071f456c52e9d124de6 (diff)
* In case of a 'for' loop, don't declare the iterator of a type that has a larger value range when the iterator can take a maximum value of a more efficient data type. (int to uint8 in most cases).
* Other minor cleanups, Null pointer checks etc. --HG-- branch : trunk
Diffstat (limited to 'src/game/Creature.cpp')
-rw-r--r--src/game/Creature.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index 65dc188063c..56c7ce8ef75 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -145,7 +145,7 @@ m_creatureInfo(NULL), m_reactState(REACT_AGGRESSIVE), m_formation(NULL), m_summo
m_regenTimer = 200;
m_valuesCount = UNIT_END;
- for(int i =0; i<CREATURE_MAX_SPELLS; ++i)
+ for(uint8 i =0; i<CREATURE_MAX_SPELLS; ++i)
m_spells[i] = 0;
m_CreatureSpellCooldowns.clear();
@@ -333,7 +333,7 @@ bool Creature::InitEntry(uint32 Entry, uint32 team, const CreatureData *data )
if(!m_respawnradius && m_defaultMovementType==RANDOM_MOTION_TYPE)
m_defaultMovementType = IDLE_MOTION_TYPE;
- for(int i=0; i < CREATURE_MAX_SPELLS; ++i)
+ for(uint8 i=0; i < CREATURE_MAX_SPELLS; ++i)
m_spells[i] = GetCreatureInfo()->spells[i];
return true;