pedantic: replace GNU empty initializer extension with C99 0 initializer

This commit is contained in:
James R 2022-02-20 03:13:23 -08:00
parent 59c04ae041
commit 286010c6e9
3 changed files with 9 additions and 9 deletions

View file

@ -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);

View file

@ -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;

View file

@ -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;