From ddea3f3853e349b4cd429ba180490473974654f2 Mon Sep 17 00:00:00 2001 From: Ian Brun Date: Wed, 9 Sep 2020 02:35:31 +0200 Subject: [PATCH] Static analysis fix: Warning V792: The 'HasCondition' function located to the right of the operator '|' will be called regardless of the value of the left operand. --- mp/src/game/server/ai_behavior_assault.cpp | 2 +- sp/src/game/server/ai_behavior_assault.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mp/src/game/server/ai_behavior_assault.cpp b/mp/src/game/server/ai_behavior_assault.cpp index e02627cc..d57ec618 100644 --- a/mp/src/game/server/ai_behavior_assault.cpp +++ b/mp/src/game/server/ai_behavior_assault.cpp @@ -1257,7 +1257,7 @@ int CAI_AssaultBehavior::TranslateSchedule( int scheduleType ) break; case SCHED_HOLD_RALLY_POINT: - if( HasCondition(COND_NO_PRIMARY_AMMO) | HasCondition(COND_LOW_PRIMARY_AMMO) ) + if( HasCondition(COND_NO_PRIMARY_AMMO) || HasCondition(COND_LOW_PRIMARY_AMMO) ) { return SCHED_RELOAD; } diff --git a/sp/src/game/server/ai_behavior_assault.cpp b/sp/src/game/server/ai_behavior_assault.cpp index e02627cc..d57ec618 100644 --- a/sp/src/game/server/ai_behavior_assault.cpp +++ b/sp/src/game/server/ai_behavior_assault.cpp @@ -1257,7 +1257,7 @@ int CAI_AssaultBehavior::TranslateSchedule( int scheduleType ) break; case SCHED_HOLD_RALLY_POINT: - if( HasCondition(COND_NO_PRIMARY_AMMO) | HasCondition(COND_LOW_PRIMARY_AMMO) ) + if( HasCondition(COND_NO_PRIMARY_AMMO) || HasCondition(COND_LOW_PRIMARY_AMMO) ) { return SCHED_RELOAD; }