From e92cc494595f9663c422b4dd7e08ddb5659b0a93 Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Tue, 19 Dec 2023 23:53:52 -0600 Subject: [PATCH] Fix MSVC warning --- src/SFML/Internal.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/SFML/Internal.h b/src/SFML/Internal.h index 001117e..f26ac71 100644 --- a/src/SFML/Internal.h +++ b/src/SFML/Internal.h @@ -30,9 +30,6 @@ //////////////////////////////////////////////////////////// #include -// this macro avoids the C4127 warning on VC++ ("conditional expression is constant") -#define ASSERT_FALSE (__LINE__ == -1) - #ifndef NDEBUG #define CSFML_CHECK(object_) \ @@ -44,7 +41,7 @@ return; \ } \ } \ - while (ASSERT_FALSE) + while (0) #define CSFML_CALL(object_, function_) \ do \ @@ -58,7 +55,7 @@ fprintf(stderr, "SFML warning: trying to use a null " #object_ " object\n"); \ } \ } \ - while (ASSERT_FALSE) + while (0) #define CSFML_CALL_PTR(object_, function_) \ do \ @@ -72,7 +69,7 @@ fprintf(stderr, "SFML warning: trying to use a null " #object_ " object\n"); \ } \ } \ - while (ASSERT_FALSE) + while (0) #define CSFML_CHECK_RETURN(object_, default_) \ do \ @@ -83,7 +80,7 @@ return default_; \ } \ } \ - while (ASSERT_FALSE) + while (0) #define CSFML_CALL_RETURN(object_, function_, default_) \ if (object_) \