From 03414e8e848fd99e2ea83f4466a1cf34c2ad6807 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 9 Jun 2018 11:34:43 -0400 Subject: Common: Add header for compiler-specifics Instead of globbing things under an ambiguous Common.h header, move compiler-specifics over to Compiler.h. This gives us a dedicated home for anything related to compilers that we want to make functional across all compilers that we support. This moves us a little closer to eliminating Common.h entirely. --- Source/Core/VideoCommon/IndexGenerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/VideoCommon/IndexGenerator.cpp') diff --git a/Source/Core/VideoCommon/IndexGenerator.cpp b/Source/Core/VideoCommon/IndexGenerator.cpp index 74f6a8a728..2d9ec0d098 100644 --- a/Source/Core/VideoCommon/IndexGenerator.cpp +++ b/Source/Core/VideoCommon/IndexGenerator.cpp @@ -4,8 +4,8 @@ #include -#include "Common/Common.h" #include "Common/CommonTypes.h" +#include "Common/Compiler.h" #include "Common/Logging/Log.h" #include "VideoCommon/IndexGenerator.h" #include "VideoCommon/OpcodeDecoding.h" -- cgit v1.2.3 From 3f210836ad330bcb6bca5dee73c5c542ac18af32 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 9 Jun 2018 11:47:01 -0400 Subject: Compiler: Rename __forceinline define to DOLPHIN_FORCE_INLINE This is much better as prefixed double underscores are reserved for the implementation when it comes to identifiers. Another reason its better, is that, on Windows, where __forceinline is a compiler built-in, with the previous define, header inclusion software that detects unnecessary includes will erroneously flag usages of Compiler.h as unnecessary (despite being necessary on other platforms). So we define a macro that's used by Windows and other platforms to ensure this doesn't happen. --- Source/Core/VideoCommon/IndexGenerator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Source/Core/VideoCommon/IndexGenerator.cpp') diff --git a/Source/Core/VideoCommon/IndexGenerator.cpp b/Source/Core/VideoCommon/IndexGenerator.cpp index 2d9ec0d098..6cb49aceba 100644 --- a/Source/Core/VideoCommon/IndexGenerator.cpp +++ b/Source/Core/VideoCommon/IndexGenerator.cpp @@ -58,7 +58,8 @@ void IndexGenerator::AddIndices(int primitive, u32 numVerts) // Triangles template -__forceinline u16* IndexGenerator::WriteTriangle(u16* Iptr, u32 index1, u32 index2, u32 index3) +DOLPHIN_FORCE_INLINE u16* IndexGenerator::WriteTriangle(u16* Iptr, u32 index1, u32 index2, + u32 index3) { *Iptr++ = index1; *Iptr++ = index2; -- cgit v1.2.3