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/CampaignMissionStarship.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Stars45/CampaignMissionStarship.cpp') diff --git a/Stars45/CampaignMissionStarship.cpp b/Stars45/CampaignMissionStarship.cpp index 184ad00..74eb2be 100644 --- a/Stars45/CampaignMissionStarship.cpp +++ b/Stars45/CampaignMissionStarship.cpp @@ -875,7 +875,7 @@ CampaignMissionStarship::CreateTargetsCarrier() RandomDirection() * Random( 50e3, 100e3); - int ntargets = 2 + RandomChance() ? 1 : 0; + int ntargets = 2 + (RandomChance() ? 1 : 0); int ntries = 8; while (ntargets > 0 && ntries > 0) { @@ -932,7 +932,7 @@ CampaignMissionStarship::CreateTargetsPatrol() elem->AddNavPoint(n); } - int ntargets = 2 + RandomChance() ? 1 : 0; + int ntargets = 2 + (RandomChance() ? 1 : 0); int ntries = 8; while (ntargets > 0 && ntries > 0) { -- cgit v1.1