From c45ce5cc4e54bdae2fd45a130d8957ec55b51b1b Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Fri, 9 Dec 2011 14:12:12 +0000 Subject: A few fixes recommended by PVS Studio --- Stars45/CampaignPlanMovement.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Stars45/CampaignPlanMovement.cpp') diff --git a/Stars45/CampaignPlanMovement.cpp b/Stars45/CampaignPlanMovement.cpp index dc08798..1333503 100644 --- a/Stars45/CampaignPlanMovement.cpp +++ b/Stars45/CampaignPlanMovement.cpp @@ -136,7 +136,7 @@ CampaignPlanMovement::MoveUnit(CombatUnit* u) if (unit->GetCombatGroup() != u->GetCombatGroup() && unit->GetRegion() == u->GetRegion() && !unit->IsDropship()) { Point delta = loc - unit->Location(); - double dist = delta.Normalize(); + dist = delta.Normalize(); if (dist < closest_dist) { closest_unit = unit; @@ -147,7 +147,7 @@ CampaignPlanMovement::MoveUnit(CombatUnit* u) if (closest_unit && closest_dist < MIN_DIST) { Point delta = loc - closest_unit->Location(); - double dist = delta.Normalize(); + dist = delta.Normalize(); loc += delta * 1.1 * (MIN_DIST - closest_dist); -- cgit v1.1