diff --git a/src/common/common_funcs.h b/src/common/common_funcs.h index ff7452f6c..02b117939 100644 --- a/src/common/common_funcs.h +++ b/src/common/common_funcs.h @@ -46,14 +46,8 @@ __declspec(dllimport) void __stdcall DebugBreak(void); #endif #ifdef _MSC_VER -#if (_MSC_VER < 1900) -// Function Cross-Compatibility -#define snprintf _snprintf -#endif - // Locale Cross-Compatibility #define locale_t _locale_t - #endif // _MSC_VER #define DECLARE_ENUM_FLAG_OPERATORS(type) \ diff --git a/src/common/ring_buffer.h b/src/common/ring_buffer.h index 9b7e32b2c..e10a9f89d 100644 --- a/src/common/ring_buffer.h +++ b/src/common/ring_buffer.h @@ -105,8 +105,6 @@ public: private: // It is important to separate the below atomics for performance reasons: // Having them on the same cache-line would result in false-sharing between them. - // TODO: Remove this ifdef whenever clang and GCC support - // std::hardware_destructive_interference_size. #if defined(_MSC_VER) && _MSC_VER >= 1911 static constexpr std::size_t padding_size = std::hardware_destructive_interference_size - sizeof(std::atomic_size_t); diff --git a/src/core/hle/service/gsp/gsp_gpu.h b/src/core/hle/service/gsp/gsp_gpu.h index 7de8191a2..7441291db 100644 --- a/src/core/hle/service/gsp/gsp_gpu.h +++ b/src/core/hle/service/gsp/gsp_gpu.h @@ -95,12 +95,8 @@ struct FrameBufferUpdate { u32 pad2; }; static_assert(sizeof(FrameBufferUpdate) == 0x40, "Struct has incorrect size"); -// TODO: Not sure if this padding is correct. -// Chances are the second block is stored at offset 0x24 rather than 0x20. -#ifndef _MSC_VER static_assert(offsetof(FrameBufferUpdate, framebuffer_info[1]) == 0x20, "FrameBufferInfo element has incorrect alignment"); -#endif /// GSP command struct Command { diff --git a/src/core/hw/lcd.h b/src/core/hw/lcd.h index 9667c7c4c..8e681609b 100644 --- a/src/core/hw/lcd.h +++ b/src/core/hw/lcd.h @@ -64,22 +64,14 @@ private: }; static_assert(std::is_standard_layout::value, "Structure does not use standard layout"); -// TODO: MSVC does not support using offsetof() on non-static data members even though this -// is technically allowed since C++11. This macro should be enabled once MSVC adds -// support for that. -#ifndef _MSC_VER #define ASSERT_REG_POSITION(field_name, position) \ static_assert(offsetof(Regs, field_name) == position * 4, \ "Field " #field_name " has invalid position") - ASSERT_REG_POSITION(color_fill_top, 0x81); ASSERT_REG_POSITION(backlight_top, 0x90); ASSERT_REG_POSITION(color_fill_bottom, 0x281); ASSERT_REG_POSITION(backlight_bottom, 0x290); -#undef ASSERT_REG_POSITION -#endif // !defined(_MSC_VER) - extern Regs g_regs; template