Browse Source

Use a separate include macro different from extra code macro.

Apparently nobody was using this feature and did not notice that lots of code in _EXTRA macro does not work with __has_include().
Rokas Kupstys 4 years ago
parent
commit
977c7bf497

+ 4 - 6
Include/RmlUi/Core/Colour.h

@@ -102,12 +102,10 @@ public:
 
 	ColourType red, green, blue, alpha;
 
-#ifdef RMLUI_COLOUR_USER_EXTRA
-	#if defined(__has_include) && __has_include(RMLUI_COLOUR_USER_EXTRA)
-		#include RMLUI_COLOUR_USER_EXTRA
-	#else
-		RMLUI_COLOUR_USER_EXTRA
-	#endif
+#if defined(RMLUI_COLOUR_USER_EXTRA)
+	RMLUI_COLOUR_USER_EXTRA
+#elif defined(RMLUI_COLOUR_USER_INCLUDE)
+	#include RMLUI_COLOUR_USER_INCLUDE
 #endif
 };
 

+ 4 - 6
Include/RmlUi/Core/Matrix4.h

@@ -499,12 +499,10 @@ class Matrix4
 		static ThisType Compose(const Vector3< Component >& translation, const Vector3< Component >& scale,
 			const Vector3< Component >& skew, const Vector4< Component >& perspective, const Vector4< Component >& quaternion) noexcept;
 
-#ifdef RMLUI_MATRIX4_USER_EXTRA
-	#if defined(__has_include) && __has_include(RMLUI_MATRIX4_USER_EXTRA)
-		#include RMLUI_MATRIX4_USER_EXTRA
-	#else
-		RMLUI_MATRIX4_USER_EXTRA
-	#endif
+#if defined(RMLUI_MATRIX4_USER_EXTRA)
+	RMLUI_MATRIX4_USER_EXTRA
+#elif defined(RMLUI_MATRIX4_USER_INCLUDE)
+	#include RMLUI_MATRIX4_USER_INCLUDE
 #endif
 };
 

+ 4 - 6
Include/RmlUi/Core/Vector2.h

@@ -153,12 +153,10 @@ class Vector2
 		Type x;
 		Type y;
 
-#ifdef RMLUI_VECTOR2_USER_EXTRA
-	#if defined(__has_include) && __has_include(RMLUI_VECTOR2_USER_EXTRA)
-		#include RMLUI_VECTOR2_USER_EXTRA
-	#else
-		RMLUI_VECTOR2_USER_EXTRA
-	#endif
+#if defined(RMLUI_VECTOR2_USER_EXTRA)
+	RMLUI_VECTOR2_USER_EXTRA
+#elif defined(RMLUI_VECTOR2_USER_INCLUDE)
+	#include RMLUI_VECTOR2_USER_INCLUDE
 #endif
 };
 

+ 4 - 6
Include/RmlUi/Core/Vector3.h

@@ -139,12 +139,10 @@ class Vector3
 		Type y;
 		Type z;
 
-#ifdef RMLUI_VECTOR3_USER_EXTRA
-	#if defined(__has_include) && __has_include(RMLUI_VECTOR3_USER_EXTRA)
-		#include RMLUI_VECTOR3_USER_EXTRA
-	#else
-		RMLUI_VECTOR3_USER_EXTRA
-	#endif
+#if defined(RMLUI_VECTOR3_USER_EXTRA)
+	RMLUI_VECTOR3_USER_EXTRA
+#elif defined(RMLUI_VECTOR3_USER_INCLUDE)
+	#include RMLUI_VECTOR3_USER_INCLUDE
 #endif
 };
 

+ 4 - 6
Include/RmlUi/Core/Vector4.h

@@ -144,12 +144,10 @@ class Vector4
 		Type z;
 		Type w;
 
-#ifdef RMLUI_VECTOR4_USER_EXTRA
-	#if defined(__has_include) && __has_include(RMLUI_VECTOR4_USER_EXTRA)
-		#include RMLUI_VECTOR4_USER_EXTRA
-	#else
-		RMLUI_VECTOR4_USER_EXTRA
-	#endif
+#if defined(RMLUI_VECTOR4_USER_EXTRA)
+	RMLUI_VECTOR4_USER_EXTRA
+#elif defined(RMLUI_VECTOR4_USER_INCLUDE)
+	#include RMLUI_VECTOR4_USER_INCLUDE
 #endif
 };