diff options
| author | Shauren <shauren.trinity@gmail.com> | 2023-01-01 00:26:53 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2023-08-12 14:24:24 +0200 |
| commit | b7287e85e4bc8acb2b95271ece9dd8a5b93873cd (patch) | |
| tree | 6088602ac914ef69573ce551d7fc4f0613beb5ce /dep/g3dlite/include/G3D/Array.h | |
| parent | f9033a5dbd559fde3030a21d83d664983d95f39f (diff) | |
Core/Misc: Fixed deprecation warnings for c++20
(cherry picked from commit ba9bbbc9d0c3b80d8954ad6390d23ae3d0f804b2)
Diffstat (limited to 'dep/g3dlite/include/G3D/Array.h')
| -rw-r--r-- | dep/g3dlite/include/G3D/Array.h | 4 |
1 files changed, 2 insertions, 2 deletions
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<T>& other) { - static_assert(std::is_pod<T>::value, "copyPOD called on non-POD type"); + static_assert(std::is_standard_layout_v<T> && std::is_trivial_v<T>, "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<T>& other) { - static_assert(std::is_pod<T>::value, "appendPOD called on non-POD type"); + static_assert(std::is_standard_layout_v<T> && std::is_trivial_v<T>, "appendPOD called on non-POD type"); const size_t oldSize = num; num += other.num; if (numAllocated < num) { |
