mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
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.
This commit is contained in:
@ -25,7 +25,7 @@ public:
|
||||
|
||||
size_t size() const { return end - buffer; }
|
||||
template <typename T, bool swapped = true>
|
||||
__forceinline T Peek(int offset = 0) const
|
||||
DOLPHIN_FORCE_INLINE T Peek(int offset = 0) const
|
||||
{
|
||||
T data;
|
||||
std::memcpy(&data, &buffer[offset], sizeof(T));
|
||||
@ -37,7 +37,7 @@ public:
|
||||
}
|
||||
|
||||
template <typename T, bool swapped = true>
|
||||
__forceinline T Read()
|
||||
DOLPHIN_FORCE_INLINE T Read()
|
||||
{
|
||||
const T result = Peek<T, swapped>();
|
||||
buffer += sizeof(T);
|
||||
@ -45,7 +45,7 @@ public:
|
||||
}
|
||||
|
||||
template <typename T, bool swapped = false>
|
||||
__forceinline void Write(T data)
|
||||
DOLPHIN_FORCE_INLINE void Write(T data)
|
||||
{
|
||||
if (swapped)
|
||||
data = Common::FromBigEndian(data);
|
||||
|
Reference in New Issue
Block a user