mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-28 13:46:13 +01:00
Fix MSVC warning
This commit is contained in:
1 parent
3e24bb1dc9
commit
e92cc49459
1 file changed
+4
-7
+4
-7
@@ -30,9 +30,6 @@
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
// this macro avoids the C4127 warning on VC++ ("conditional expression is constant")
|
|
||||||
#define ASSERT_FALSE (__LINE__ == -1)
|
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
|
|
||||||
#define CSFML_CHECK(object_) \
|
#define CSFML_CHECK(object_) \
|
||||||
@@ -44,7 +41,7 @@
|
|||||||
return; \
|
return; \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
while (ASSERT_FALSE)
|
while (0)
|
||||||
|
|
||||||
#define CSFML_CALL(object_, function_) \
|
#define CSFML_CALL(object_, function_) \
|
||||||
do \
|
do \
|
||||||
@@ -58,7 +55,7 @@
|
|||||||
fprintf(stderr, "SFML warning: trying to use a null " #object_ " object\n"); \
|
fprintf(stderr, "SFML warning: trying to use a null " #object_ " object\n"); \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
while (ASSERT_FALSE)
|
while (0)
|
||||||
|
|
||||||
#define CSFML_CALL_PTR(object_, function_) \
|
#define CSFML_CALL_PTR(object_, function_) \
|
||||||
do \
|
do \
|
||||||
@@ -72,7 +69,7 @@
|
|||||||
fprintf(stderr, "SFML warning: trying to use a null " #object_ " object\n"); \
|
fprintf(stderr, "SFML warning: trying to use a null " #object_ " object\n"); \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
while (ASSERT_FALSE)
|
while (0)
|
||||||
|
|
||||||
#define CSFML_CHECK_RETURN(object_, default_) \
|
#define CSFML_CHECK_RETURN(object_, default_) \
|
||||||
do \
|
do \
|
||||||
@@ -83,7 +80,7 @@
|
|||||||
return default_; \
|
return default_; \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
while (ASSERT_FALSE)
|
while (0)
|
||||||
|
|
||||||
#define CSFML_CALL_RETURN(object_, function_, default_) \
|
#define CSFML_CALL_RETURN(object_, function_, default_) \
|
||||||
if (object_) \
|
if (object_) \
|
||||||
|
|||||||
Reference in new issue
Block a user