From de196b1c588d896d24ed402b6046d57370540611 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Fri, 31 Jan 2025 10:36:27 +0300 Subject: [PATCH] common: xash3d_types: avoid defining true and false in C23 --- common/xash3d_types.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/xash3d_types.h b/common/xash3d_types.h index ecac1ffb..7d8cba87 100644 --- a/common/xash3d_types.h +++ b/common/xash3d_types.h @@ -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