X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Flib%2Fbool.qh;h=dc50c771f164470a2a1e9d81d63c838c549abd2e;hb=91682260cac4d53504a2e22c1bb621e2c855602c;hp=34e8bfc66999b66968cc4b08e8de1b283167dbea;hpb=d3e642e032c1e9e62fc5400c14627c54e37e4ae0;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/lib/bool.qh b/qcsrc/lib/bool.qh index 34e8bfc66..dc50c771f 100644 --- a/qcsrc/lib/bool.qh +++ b/qcsrc/lib/bool.qh @@ -1,5 +1,4 @@ -#ifndef BOOL_H -#define BOOL_H +#pragma once #ifndef QCC_SUPPORT_BOOL // Boolean Constants @@ -7,9 +6,7 @@ const int false = 0; #endif -// Transitional aliases -[[deprecated("use true")]][[alias("true")]] const bool TRUE; -[[deprecated("use false")]][[alias("false")]] const bool FALSE; +#define boolean(value) ((value) != 0) // get true/false value of a string with multiple different inputs float InterpretBoolean(string input) @@ -26,10 +23,6 @@ float InterpretBoolean(string input) case "off": return false; - default: return stof(input); + default: return boolean(stof(input)); } } - -#define boolean(value) ((value) != 0) - -#endif