From ba9bbbc9d0c3b80d8954ad6390d23ae3d0f804b2 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 1 Jan 2023 00:26:53 +0100 Subject: Core/Misc: Fixed deprecation warnings for c++20 --- dep/g3dlite/G3D-v9.0 hotfix10.diff | 4 ++-- dep/g3dlite/include/G3D/Array.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'dep') diff --git a/dep/g3dlite/G3D-v9.0 hotfix10.diff b/dep/g3dlite/G3D-v9.0 hotfix10.diff index e2bd6c91a35..343ac7090fa 100644 --- a/dep/g3dlite/G3D-v9.0 hotfix10.diff +++ b/dep/g3dlite/G3D-v9.0 hotfix10.diff @@ -6,7 +6,7 @@ index c562f5c920f7..c86b20fd7e97 100644 /** Resizes this to match the size of \a other and then copies the data from other using memcpy. This is only safe for POD types */ void copyPOD(const Array& other) { -+ static_assert(std::is_pod::value, "copyPOD called on non-POD type"); ++ static_assert(std::is_standard_layout_v && std::is_trivial_v, "copyPOD called on non-POD type"); if (numAllocated < other.num) { m_memoryManager->free(data); data = NULL; @@ -14,7 +14,7 @@ index c562f5c920f7..c86b20fd7e97 100644 /** Resizes this to just barely match the size of \a other + itself and then copies the data to the end of the array from other using memcpy. This is only safe for POD types */ void appendPOD(const Array& other) { -+ static_assert(std::is_pod::value, "appendPOD called on non-POD type"); ++ static_assert(std::is_standard_layout_v && std::is_trivial_v, "appendPOD called on non-POD type"); const size_t oldSize = num; num += other.num; if (numAllocated < num) { diff --git a/dep/g3dlite/include/G3D/Array.h b/dep/g3dlite/include/G3D/Array.h index c86b20fd7e9..788237dce54 100644 --- a/dep/g3dlite/include/G3D/Array.h +++ b/dep/g3dlite/include/G3D/Array.h @@ -346,7 +346,7 @@ public: /** Resizes this to match the size of \a other and then copies the data from other using memcpy. This is only safe for POD types */ void copyPOD(const Array& other) { - static_assert(std::is_pod::value, "copyPOD called on non-POD type"); + static_assert(std::is_standard_layout_v && std::is_trivial_v, "copyPOD called on non-POD type"); if (numAllocated < other.num) { m_memoryManager->free(data); data = NULL; @@ -365,7 +365,7 @@ public: /** Resizes this to just barely match the size of \a other + itself and then copies the data to the end of the array from other using memcpy. This is only safe for POD types */ void appendPOD(const Array& other) { - static_assert(std::is_pod::value, "appendPOD called on non-POD type"); + static_assert(std::is_standard_layout_v && std::is_trivial_v, "appendPOD called on non-POD type"); const size_t oldSize = num; num += other.num; if (numAllocated < num) { -- cgit v1.2.3