Бранимир Караџић 5 vuotta sitten
vanhempi
sitoutus
927a02a3a1
2 muutettua tiedostoa jossa 12 lisäystä ja 10 poistoa
  1. 8 8
      include/bx/inline/bx.inl
  2. 4 2
      include/bx/macros.h

+ 8 - 8
include/bx/inline/bx.inl

@@ -16,19 +16,13 @@ namespace bx
 	char(&CountOfRequireArrayArgumentT(const Ty(&)[Num]))[Num];
 	char(&CountOfRequireArrayArgumentT(const Ty(&)[Num]))[Num];
 
 
 	template<bool>
 	template<bool>
-	inline constexpr bool isEnabled()
+	BX_FORCE_INLINE constexpr bool isEnabled()
 	{
 	{
 		return true;
 		return true;
 	}
 	}
 
 
-	template<class Ty>
-	inline constexpr bool isTriviallyCopyable()
-	{
-		return __is_trivially_copyable(Ty);
-	}
-
 	template<>
 	template<>
-	inline constexpr bool isEnabled<false>()
+	BX_FORCE_INLINE constexpr bool isEnabled<false>()
 	{
 	{
 		return false;
 		return false;
 	}
 	}
@@ -38,6 +32,12 @@ namespace bx
 		return _x;
 		return _x;
 	}
 	}
 
 
+	template<class Ty>
+	inline constexpr bool isTriviallyCopyable()
+	{
+		return __is_trivially_copyable(Ty);
+	}
+
 	template<typename Ty>
 	template<typename Ty>
 	inline void swap(Ty& _a, Ty& _b)
 	inline void swap(Ty& _a, Ty& _b)
 	{
 	{

+ 4 - 2
include/bx/macros.h

@@ -3,11 +3,13 @@
  * License: https://github.com/bkaradzic/bx#license-bsd-2-clause
  * License: https://github.com/bkaradzic/bx#license-bsd-2-clause
  */
  */
 
 
+#ifndef BX_H_HEADER_GUARD
+#	error "Do not include macros.h directly #include <bx/bx.h> instead."
+#endif // BX_H_HEADER_GUARD
+
 #ifndef BX_MACROS_H_HEADER_GUARD
 #ifndef BX_MACROS_H_HEADER_GUARD
 #define BX_MACROS_H_HEADER_GUARD
 #define BX_MACROS_H_HEADER_GUARD
 
 
-#include "bx.h"
-
 ///
 ///
 #if BX_COMPILER_MSVC
 #if BX_COMPILER_MSVC
 // Workaround MSVS bug...
 // Workaround MSVS bug...