From 1ebf3ca7602287fe7a5fb00a5d02c0668acac55f Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Sun, 18 Oct 2026 10:22:02 +0300
Subject: [PATCH 88/88] bounce_unit(): Use macros instead of const variables

Fixes gnu-folding-constant warning

See RM #2360

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 server/unittools.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server/unittools.c b/server/unittools.c
index 5597a0164b..261675e37d 100644
--- a/server/unittools.c
+++ b/server/unittools.c
@@ -1239,7 +1239,7 @@ void bounce_unit(struct unit *punit, bool verbose)
 
   /* I assume that there are no topologies that have more than
    * (2d + 1)^2 tiles in the "square" of "radius" d. */
-  const int DIST = 2;
+#define DIST 2
   struct tile *tiles[(2 * DIST + 1) * (2 * DIST + 1)];
 
   if (!punit) {
@@ -1305,6 +1305,7 @@ void bounce_unit(struct unit *punit, bool verbose)
 
   wipe_unit(punit, ULR_STACK_CONFLICT, nullptr);
 }
+#undef DIST
 
 /**********************************************************************//**
   Throw pplayer's units from non-allied cities
-- 
2.53.0

