From 7532864264dd3b3b820c4b3c39ee900d5ff7cb0e Mon Sep 17 00:00:00 2001 From: Shauren Date: Thu, 17 Jul 2014 15:42:57 +0200 Subject: Buildsystem/MSVC: Warning fixes C4800 'type' : forcing value to bool 'true' or 'false' (performance warning) C4127 conditional expression is constant --- src/server/game/AI/ScriptedAI/ScriptedEscortAI.h | 2 +- src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server/game/AI/ScriptedAI') diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h index 4aa00d74e4e..177810bbbfd 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h +++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h @@ -93,7 +93,7 @@ struct npc_escortAI : public ScriptedAI void SetRun(bool on = true); void SetEscortPaused(bool on); - bool HasEscortState(uint32 escortState) { return (m_uiEscortState & escortState); } + bool HasEscortState(uint32 escortState) { return (m_uiEscortState & escortState) != 0; } virtual bool IsEscorted() { return (m_uiEscortState & STATE_ESCORT_ESCORTING); } void SetMaxPlayerDistance(float newMax) { MaxPlayerDistance = newMax; } diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h index df435fa5c9a..af7508441b9 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h +++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h @@ -60,7 +60,7 @@ class FollowerAI : public ScriptedAI void SetFollowPaused(bool bPaused); //if special event require follow mode to hold/resume during the follow void SetFollowComplete(bool bWithEndEvent = false); - bool HasFollowState(uint32 uiFollowState) { return (m_uiFollowState & uiFollowState); } + bool HasFollowState(uint32 uiFollowState) { return (m_uiFollowState & uiFollowState) != 0; } protected: Player* GetLeaderForFollower(); -- cgit v1.2.3