From 7e4b00fe413a29529680b0ee4c042293a9e4823a Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Thu, 1 Sep 2022 00:08:36 -0400
Subject: [PATCH] FIXME removal: remove the ENABLE_FIXMES code.
We're out of FIXMEs! Now that sdl12-compat is no longer running in a
it-sorta-runs-but-warn-me-about-compatibility-gaps mode, and we're
pretty confident that this is a solid compatibility layer, future FIXMEs
will be basic comments and don't need a mechanism for spotlighting
these sort of problems.
Fixes #143.
---
src/SDL12_compat.c | 27 ---------------------------
1 file changed, 27 deletions(-)
diff --git a/src/SDL12_compat.c b/src/SDL12_compat.c
index 7dcc6ba1..250f8e9d 100644
--- a/src/SDL12_compat.c
+++ b/src/SDL12_compat.c
@@ -80,30 +80,6 @@
extern "C" {
#endif
-#define ENABLE_FIXMES 1
-#if ENABLE_FIXMES == -1 /* don't even allow a build to finish if there's a FIXME */
- /* the goal with this nonsense is to make the compiler print an error that
- broadcasts the problem _and the string literal_ from the actual FIXME line */
- extern void YouCannotBuildUntilYouResolveThisFixme(char *x);
- #define FIXME(x) YouCannotBuildUntilYouResolveThisFixme(-->)
-#elif ENABLE_FIXMES == 0 /* compile out any FIXMEs entirely. */
- #define FIXME(x) do {} while (0)
-#elif ENABLE_FIXMES == 1 /* Log a warning the first time a FIXME is executed. */
- static SDL_bool PrintFixmes = SDL_TRUE;
- #define FIXME(x) \
- do { \
- if (PrintFixmes) { \
- static SDL_bool seen = SDL_FALSE; \
- if (!seen) { \
- SDL20_Log("FIXME: %s (%s:%d)\n", x, __FUNCTION__, __LINE__); \
- seen = SDL_TRUE; \
- } \
- } \
- } while (0)
-#else
- #error Please fix the ENABLE_FIXMES define.
-#endif
-
#define SDL20_SYM(rc,fn,params,args,ret) \
typedef rc (SDLCALL *SDL20_##fn##_t) params; \
static SDL20_##fn##_t SDL20_##fn = NULL;
@@ -1359,9 +1335,6 @@ LoadSDL20(void)
sprintf_fn(loaderror, "SDL2 %d.%d.%d library is too old.", v.major, v.minor, v.patch);
} else {
const SDL_bool debug_logging = SDL12Compat_GetHintBoolean("SDL12COMPAT_DEBUG_LOGGING", SDL_FALSE);
- #if ENABLE_FIXMES == 1
- PrintFixmes = debug_logging;
- #endif
if (debug_logging) {
#if defined(__DATE__) && defined(__TIME__)
SDL20_Log("sdl12-compat, built on " __DATE__ " at " __TIME__ ", talking to SDL2 %d.%d.%d", v.major, v.minor, v.patch);