From 927a02a3a1b72c8a162380d53fdccc715fd042bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Fri, 10 Apr 2020 21:12:19 -0700 Subject: [PATCH] Cleanup. --- include/bx/inline/bx.inl | 16 ++++++++-------- include/bx/macros.h | 6 ++++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/include/bx/inline/bx.inl b/include/bx/inline/bx.inl index e8019fe..b54e8dd 100644 --- a/include/bx/inline/bx.inl +++ b/include/bx/inline/bx.inl @@ -16,19 +16,13 @@ namespace bx char(&CountOfRequireArrayArgumentT(const Ty(&)[Num]))[Num]; template - inline constexpr bool isEnabled() + BX_FORCE_INLINE constexpr bool isEnabled() { return true; } - template - inline constexpr bool isTriviallyCopyable() - { - return __is_trivially_copyable(Ty); - } - template<> - inline constexpr bool isEnabled() + BX_FORCE_INLINE constexpr bool isEnabled() { return false; } @@ -38,6 +32,12 @@ namespace bx return _x; } + template + inline constexpr bool isTriviallyCopyable() + { + return __is_trivially_copyable(Ty); + } + template inline void swap(Ty& _a, Ty& _b) { diff --git a/include/bx/macros.h b/include/bx/macros.h index 801c49f..f4a003b 100644 --- a/include/bx/macros.h +++ b/include/bx/macros.h @@ -3,11 +3,13 @@ * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#ifndef BX_H_HEADER_GUARD +# error "Do not include macros.h directly #include instead." +#endif // BX_H_HEADER_GUARD + #ifndef BX_MACROS_H_HEADER_GUARD #define BX_MACROS_H_HEADER_GUARD -#include "bx.h" - /// #if BX_COMPILER_MSVC // Workaround MSVS bug...