VERY experimental Nintendo Switch 2 emulator
C++
hle: ipc_helpers: Ignore -Wclass-memaccess
Morph4c1b4cc486b9
diff --git a/src/core/hle/ipc_helpers.h b/src/core/hle/ipc_helpers.hindex cf204f5704..026257115b 100644--- a/src/core/hle/ipc_helpers.h+++ b/src/core/hle/ipc_helpers.h@@ -404,6 +404,11 @@ inline s32 RequestParser::Pop() {return static_cast<s32>(Pop<u32>());}+// Ignore the -Wclass-memaccess warning on memcpy for non-trivially default constructible objects.+#if defined(__GNUC__)+#pragma GCC diagnostic push+#pragma GCC diagnostic ignored "-Wclass-memaccess"+#endiftemplate <typename T>void RequestParser::PopRaw(T& value) {static_assert(std::is_trivially_copyable_v<T>,@@ -411,6 +416,9 @@ void RequestParser::PopRaw(T& value) {std::memcpy(&value, cmdbuf + index, sizeof(T));index += (sizeof(T) + 3) / 4; // round up to word length}+#if defined(__GNUC__)+#pragma GCC diagnostic pop+#endiftemplate <typename T>T RequestParser::PopRaw() {