diff options
| author | Shauren <shauren.trinity@gmail.com> | 2014-07-17 15:42:57 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2014-07-17 15:42:57 +0200 |
| commit | 7532864264dd3b3b820c4b3c39ee900d5ff7cb0e (patch) | |
| tree | 4c385674de3ef458300a0395ba7e64bafad1d0db /src/server/game/Maps/Map.cpp | |
| parent | 345bed25d25d8e269fd7b863cd700d628a9500e0 (diff) | |
Buildsystem/MSVC: Warning fixes
C4800 'type' : forcing value to bool 'true' or 'false' (performance warning)
C4127 conditional expression is constant
Diffstat (limited to 'src/server/game/Maps/Map.cpp')
| -rw-r--r-- | src/server/game/Maps/Map.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index bfb38a31248..fbc33418e47 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -2195,13 +2195,13 @@ inline bool IsOutdoorWMO(uint32 mogpFlags, int32 /*adtId*/, int32 /*rootId*/, in return false; } - outdoor = mogpFlags&0x8; + outdoor = (mogpFlags & 0x8) != 0; if (wmoEntry) { if (wmoEntry->Flags & 4) return true; - if ((wmoEntry->Flags & 2)!=0) + if (wmoEntry->Flags & 2) outdoor = false; } return outdoor; @@ -2442,12 +2442,12 @@ bool Map::IsInWater(float x, float y, float pZ, LiquidData* data) const { LiquidData liquid_status; LiquidData* liquid_ptr = data ? data : &liquid_status; - return getLiquidStatus(x, y, pZ, MAP_ALL_LIQUIDS, liquid_ptr) & (LIQUID_MAP_IN_WATER | LIQUID_MAP_UNDER_WATER); + return (getLiquidStatus(x, y, pZ, MAP_ALL_LIQUIDS, liquid_ptr) & (LIQUID_MAP_IN_WATER | LIQUID_MAP_UNDER_WATER)) != 0; } bool Map::IsUnderWater(float x, float y, float z) const { - return getLiquidStatus(x, y, z, MAP_LIQUID_TYPE_WATER|MAP_LIQUID_TYPE_OCEAN) & LIQUID_MAP_UNDER_WATER; + return (getLiquidStatus(x, y, z, MAP_LIQUID_TYPE_WATER | MAP_LIQUID_TYPE_OCEAN) & LIQUID_MAP_UNDER_WATER) != 0; } bool Map::CheckGridIntegrity(Creature* c, bool moved) const |
