From 014e2bbdb275ad48b0bf5057e89f4bf7c4cb4dfc Mon Sep 17 00:00:00 2001
From: pionere <[EMAIL REDACTED]>
Date: Wed, 12 Jan 2022 16:40:52 +0100
Subject: [PATCH] use SDL_COMPILE_TIME_ASSERT instead of SDL_STATIC_ASSERT
---
include/SDL_assert.h | 1 -
src/video/windows/SDL_windowswindow.c | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/SDL_assert.h b/include/SDL_assert.h
index fb20be759a9..defadf13717 100644
--- a/include/SDL_assert.h
+++ b/include/SDL_assert.h
@@ -76,7 +76,6 @@ assert can have unique static variables associated with it.
#endif
#define SDL_FILE __FILE__
#define SDL_LINE __LINE__
-#define SDL_STATIC_ASSERT(COND,MSG) typedef char static_assertion_##MSG[(COND)?1:-1];
/*
sizeof (x) makes the compiler still parse the expression even without
diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c
index 3a5a9ca857e..53365f1604f 100644
--- a/src/video/windows/SDL_windowswindow.c
+++ b/src/video/windows/SDL_windowswindow.c
@@ -448,7 +448,7 @@ WIN_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon)
SDL_bool isstack;
/* Create temporary buffer for ICONIMAGE structure */
- SDL_STATIC_ASSERT(sizeof(BITMAPINFOHEADER) == 40, WIN_SetWindowIcon_uses_BITMAPINFOHEADER_to_prepare_an_ICONIMAGE);
+ SDL_COMPILE_TIME_ASSERT(WIN_SetWindowIcon_uses_BITMAPINFOHEADER_to_prepare_an_ICONIMAGE, sizeof(BITMAPINFOHEADER) == 40);
mask_len = (icon->h * (icon->w + 7)/8);
icon_len = sizeof(BITMAPINFOHEADER) + icon->h * icon->w * sizeof(Uint32) + mask_len;
icon_bmp = SDL_small_alloc(BYTE, icon_len, &isstack);