From 2ec3f3ebaada7a2c55d185eb0e1f392a5c51af7e Mon Sep 17 00:00:00 2001 From: elexis Date: Sat, 12 Nov 2016 16:07:23 +0000 Subject: [PATCH] Add parenthesis suggested by gcc 5.4 following 3e59ac76ee, refs #4278. This was SVN commit r18924. --- source/simulation2/components/CCmpUnitMotion.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/simulation2/components/CCmpUnitMotion.cpp b/source/simulation2/components/CCmpUnitMotion.cpp index 4782142c19..595d570444 100644 --- a/source/simulation2/components/CCmpUnitMotion.cpp +++ b/source/simulation2/components/CCmpUnitMotion.cpp @@ -1579,7 +1579,7 @@ bool CCmpUnitMotion::MoveToTargetRange(entity_id_t target, entity_pos_t minRange entity_pos_t previousDistance = Geometry::DistanceToSquare(pos - CFixedVector2D(previousObstruction.x, previousObstruction.z), obstruction.u, obstruction.v, halfSize, true); bool inside = distance.IsZero() && !Geometry::DistanceToSquare(pos - CFixedVector2D(obstruction.x, obstruction.z), obstruction.u, obstruction.v, halfSize).IsZero(); - if (distance < minRange && previousDistance < minRange || inside) + if ((distance < minRange && previousDistance < minRange) || inside) { // Too close to the square - need to move away @@ -1701,7 +1701,7 @@ bool CCmpUnitMotion::IsInTargetRange(entity_id_t target, entity_pos_t minRange, // See if we're too close to the target square bool inside = distance.IsZero() && !Geometry::DistanceToSquare(pos - CFixedVector2D(obstruction.x, obstruction.z), obstruction.u, obstruction.v, halfSize).IsZero(); - if (distance < minRange && previousDistance < minRange || inside) + if ((distance < minRange && previousDistance < minRange) || inside) return false; // See if we're close enough to the target square