From bca4f30ee38bed7c2fa0d00ac9a0efe7ce9b9ba0 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Wed, 25 Sep 2019 07:17:14 -0400 Subject: [PATCH] Use defines here instead I got a "initializer element is not constant" error when compiling. From a quick Google search, it seems that const-type variables aren't totally considered constants in C. There may be a better way to fix this error. --- src/k_waypoint.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/k_waypoint.c b/src/k_waypoint.c index 6673cec97..4070e61e6 100644 --- a/src/k_waypoint.c +++ b/src/k_waypoint.c @@ -11,9 +11,9 @@ static const UINT32 SPARKLES_PER_CONNECTION = 16U; // Some defaults for the size of the dynamically allocated sets for pathfinding. These are kept for the purpose of // allocating a size that is less likely to need reallocating again during the pathfinding. -static const size_t OPENSET_BASE_SIZE = 16U; -static const size_t CLOSEDSET_BASE_SIZE = 256U; -static const size_t NODESARRAY_BASE_SIZE = 256U; +#define OPENSET_BASE_SIZE 16U; +#define CLOSEDSET_BASE_SIZE 256U; +#define NODESARRAY_BASE_SIZE 256U; static waypoint_t *waypointheap = NULL; static waypoint_t *firstwaypoint = NULL;