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/Movement | |
| 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/Movement')
| -rw-r--r-- | src/server/game/Movement/PathGenerator.cpp | 4 | ||||
| -rw-r--r-- | src/server/game/Movement/Spline/MoveSplineFlag.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Movement/PathGenerator.cpp b/src/server/game/Movement/PathGenerator.cpp index f2e1bb518d4..cbf88b68028 100644 --- a/src/server/game/Movement/PathGenerator.cpp +++ b/src/server/game/Movement/PathGenerator.cpp @@ -793,8 +793,8 @@ dtStatus PathGenerator::FindSmoothPath(float const* startPos, float const* endPo if (!GetSteerTarget(iterPos, targetPos, SMOOTH_PATH_SLOP, polys, npolys, steerPos, steerPosFlag, steerPosRef)) break; - bool endOfPath = (steerPosFlag & DT_STRAIGHTPATH_END); - bool offMeshConnection = (steerPosFlag & DT_STRAIGHTPATH_OFFMESH_CONNECTION); + bool endOfPath = (steerPosFlag & DT_STRAIGHTPATH_END) != 0; + bool offMeshConnection = (steerPosFlag & DT_STRAIGHTPATH_OFFMESH_CONNECTION) != 0; // Find movement delta. float delta[VERTEX_SIZE]; diff --git a/src/server/game/Movement/Spline/MoveSplineFlag.h b/src/server/game/Movement/Spline/MoveSplineFlag.h index 2cac9034c84..62fe808b6f5 100644 --- a/src/server/game/Movement/Spline/MoveSplineFlag.h +++ b/src/server/game/Movement/Spline/MoveSplineFlag.h @@ -83,9 +83,9 @@ namespace Movement // Constant interface - bool isSmooth() const { return raw() & Mask_CatmullRom; } + bool isSmooth() const { return (raw() & Mask_CatmullRom) != 0; } bool isLinear() const { return !isSmooth(); } - bool isFacing() const { return raw() & Mask_Final_Facing; } + bool isFacing() const { return (raw() & Mask_Final_Facing) != 0; } uint8 getAnimationId() const { return animId; } bool hasAllFlags(uint32 f) const { return (raw() & f) == f; } |
