diff --git a/src/Common/Compiler.inl b/src/Common/Compiler.inl index f48a47de46d..c3b1c8475ef 100644 --- a/src/Common/Compiler.inl +++ b/src/Common/Compiler.inl @@ -23,3 +23,11 @@ #endif #define UNUSED(...) (void)(__VA_ARGS__) + +#ifndef _CPPUNWIND//def NDEBUG +#define XR_NOEXCEPT throw() +#define XR_NOEXCEPT_OP(x) +#else +#define XR_NOEXCEPT noexcept +#define XR_NOEXCEPT_OP(x) noexcept(x) +#endif diff --git a/src/xrCore/cpuid.h b/src/xrCore/cpuid.h index c1e182ff0bd..160400af400 100644 --- a/src/xrCore/cpuid.h +++ b/src/xrCore/cpuid.h @@ -2,17 +2,6 @@ #ifndef _INC_CPUID #define _INC_CPUID -#ifndef xrCoreH -// If xrCore.h is not included then compilation fails -// This fixes it. -// XXX: Find a better solution -#ifdef NDEBUG -#define XR_NOEXCEPT throw() -#else -#define XR_NOEXCEPT noexcept -#endif -#endif - enum class CpuFeature : u32 { Mmx = 0x0001, diff --git a/src/xrCore/xrCore.h b/src/xrCore/xrCore.h index fc37b37c1bf..8b6ee6f4a7a 100644 --- a/src/xrCore/xrCore.h +++ b/src/xrCore/xrCore.h @@ -35,12 +35,8 @@ #ifdef NDEBUG #define XRAY_EXCEPTIONS 0 #define LUABIND_NO_EXCEPTIONS -#define XR_NOEXCEPT throw() -#define XR_NOEXCEPT_OP(x) #else #define XRAY_EXCEPTIONS 1 -#define XR_NOEXCEPT noexcept -#define XR_NOEXCEPT_OP(x) noexcept(x) #endif #if !defined(DEBUG) && (defined(_DEBUG) || defined(MIXED))