We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4885126 commit 975620bCopy full SHA for 975620b
src/doomtype.h
@@ -65,19 +65,22 @@
65
66
#include <inttypes.h>
67
68
-#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__cplusplus)
69
-// For C99+ and C++, use the standard boolean type
70
-#include <stdbool.h>
+#ifdef __cplusplus
+
+// Use builtin bool type with C++.
71
72
+typedef bool bool;
73
74
#else
-// For older C standards, use the original custom enum
-typedef enum { false = 0, true = 1 } bool;
-#endif
75
76
-// The original enum also defined an 'undef' state.
77
-// left for compatibility
78
-enum {
79
- undef = 0xFFFFFFFF
80
-};
+typedef enum
+{
+ false = 0,
+ true = 1,
+ undef = 0xFFFFFFFF
81
+} bool;
82
83
+#endif
84
85
typedef uint8_t byte;
86
0 commit comments