From 47137cefb72d3b3d3bc6fdefc7a4b103429f6d46 Mon Sep 17 00:00:00 2001 From: tron Date: Sun, 23 Oct 2005 13:04:44 +0000 Subject: (svn r3078) Some more stuff, which piled up: - const, whitespace, indentation, bracing, GB/SB, pointless casts - use the trinary operator where appropriate - data types (uint[] -> AcceptedCargo, ...) - if cascade -> switch - if (ptr) -> if (ptr != NULL) - DeMorgan's Law - Fix some comments - 0 -> '\0', change magic numbers to symbolic constants --- ai/trolly/pathfinder.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'ai/trolly/pathfinder.c') diff --git a/ai/trolly/pathfinder.c b/ai/trolly/pathfinder.c index aa44014f9..126e0cd41 100644 --- a/ai/trolly/pathfinder.c +++ b/ai/trolly/pathfinder.c @@ -506,9 +506,5 @@ static int32 AyStar_AiPathFinder_CalculateG(AyStar *aystar, AyStarNode *current, } } - // Res should never be below zero.. if so, make it zero! - if (res < 0) { res = 0; } - - // Return our value - return res; + return (res < 0) ? 0 : res; } -- cgit v1.2.3-54-g00ecf