From 286010c6e9817e58a1ecaf0628901af0da09448b Mon Sep 17 00:00:00 2001 From: James R Date: Sun, 20 Feb 2022 03:13:23 -0800 Subject: [PATCH] pedantic: replace GNU empty initializer extension with C99 0 initializer --- src/k_kart.c | 2 +- src/k_pathfind.c | 6 +++--- src/k_waypoint.c | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index bf63ad04e..447241e50 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -7657,7 +7657,7 @@ void K_UpdateDistanceFromFinishLine(player_t *const player) const boolean useshortcuts = false; const boolean huntbackwards = false; boolean pathfindsuccess = false; - path_t pathtofinish = {}; + path_t pathtofinish = {0}; pathfindsuccess = K_PathfindToWaypoint(player->nextwaypoint, finishline, &pathtofinish, useshortcuts, huntbackwards); diff --git a/src/k_pathfind.c b/src/k_pathfind.c index 316eab418..eb91dda2b 100644 --- a/src/k_pathfind.c +++ b/src/k_pathfind.c @@ -298,7 +298,7 @@ boolean K_PathfindAStar(path_t *const path, pathfindsetup_t *const pathfindsetup else if (pathfindsetup->startnodedata == pathfindsetup->endnodedata) { // At the destination, return a simple 1 node path - pathfindnode_t singlenode = {}; + pathfindnode_t singlenode = {0}; singlenode.camefrom = NULL; singlenode.nodedata = pathfindsetup->endnodedata; singlenode.heapindex = SIZE_MAX; @@ -311,8 +311,8 @@ boolean K_PathfindAStar(path_t *const path, pathfindsetup_t *const pathfindsetup } else { - bheap_t openset = {}; - bheapitem_t poppedbheapitem = {}; + bheap_t openset = {0}; + bheapitem_t poppedbheapitem = {0}; pathfindnode_t *nodesarray = NULL; pathfindnode_t **closedset = NULL; pathfindnode_t *newnode = NULL; diff --git a/src/k_waypoint.c b/src/k_waypoint.c index 73eb82bfa..903e66e2a 100644 --- a/src/k_waypoint.c +++ b/src/k_waypoint.c @@ -302,7 +302,7 @@ static void K_CompareOverlappingWaypoint const boolean useshortcuts = false; const boolean huntbackwards = false; boolean pathfindsuccess = false; - path_t pathtofinish = {}; + path_t pathtofinish = {0}; pathfindsuccess = K_PathfindToWaypoint(checkwaypoint, finishline, &pathtofinish, useshortcuts, huntbackwards); @@ -1064,7 +1064,7 @@ boolean K_PathfindToWaypoint( } else { - pathfindsetup_t pathfindsetup = {}; + pathfindsetup_t pathfindsetup = {0}; getconnectednodesfunc nextnodesfunc = K_WaypointPathfindGetNext; getnodeconnectioncostsfunc nodecostsfunc = K_WaypointPathfindGetNextCosts; getnodeheuristicfunc heuristicfunc = K_WaypointPathfindGetHeuristic; @@ -1158,8 +1158,8 @@ waypoint_t *K_GetNextWaypointToDestination( } else { - path_t pathtowaypoint = {}; - pathfindsetup_t pathfindsetup = {}; + path_t pathtowaypoint = {0}; + pathfindsetup_t pathfindsetup = {0}; boolean pathfindsuccess = false; getconnectednodesfunc nextnodesfunc = K_WaypointPathfindGetNext; getnodeconnectioncostsfunc nodecostsfunc = K_WaypointPathfindGetNextCosts; @@ -1559,7 +1559,7 @@ static UINT32 K_SetupCircuitLength(void) { // Create a fake finishline waypoint, then try and pathfind to the finishline from it waypoint_t fakefinishline = *finishline; - path_t bestcircuitpath = {}; + path_t bestcircuitpath = {0}; const boolean useshortcuts = false; const boolean huntbackwards = false;