From 2fb0f851c0c959a04c2cf96b719477e4ef4bab2e Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Wed, 18 Aug 2021 21:54:53 +0300 Subject: [PATCH] Update SqBase.hpp --- module/SqBase.hpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/module/SqBase.hpp b/module/SqBase.hpp index c2842ba6..bc63e456 100644 --- a/module/SqBase.hpp +++ b/module/SqBase.hpp @@ -506,6 +506,24 @@ enum EntityType #define SQMOD_NODISCARD #endif +/* ------------------------------------------------------------------------------------------------ + * FLOAT SELECTION +*/ +#ifdef SQUSEDOUBLE + #define SQMOD_DOUBLE_ONLY(X) X + #define SQMOD_EXCEPT_DOUBLE(X) + #define SQMOD_FLOAT_ONLY(X) + #define SQMOD_EXCEPT_FLOAT(X) X +#else + #define SQMOD_DOUBLE_ONLY(X) X + #define SQMOD_EXCEPT_DOUBLE(X) + #define SQMOD_FLOAT_ONLY(X) + #define SQMOD_EXCEPT_FLOAT(X) X +#endif + +#define SQMOD_DOUBLE_OR(D, F) SQMOD_DOUBLE_ONLY(D) SQMOD_EXCEPT_DOUBLE(F) +#define SQMOD_FLOAT_OR(F, D) SQMOD_FLOAT_ONLY(F) SQMOD_EXCEPT_FLOAT(D) + /* ------------------------------------------------------------------------------------------------ * DEBUG SELECTION */