Skip to content

Commit

Permalink
common: xash3d_types: avoid defining true and false in C23
Browse files Browse the repository at this point in the history
  • Loading branch information
a1batross committed Jan 31, 2025
1 parent a0eec8b commit de196b1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions common/xash3d_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ typedef uint32_t poolhandle_t;
#undef true
#undef false

#ifndef __cplusplus
typedef enum { false, true } qboolean;
#else
typedef int qboolean;
// true and false are keywords in C++ and C23
#if !__cplusplus && __STDC_VERSION__ < 202311L
enum { false, true };
#endif
typedef int qboolean;

#define MAX_STRING 256 // generic string
#define MAX_VA_STRING 1024 // compatibility macro
Expand Down

0 comments on commit de196b1

Please sign in to comment.