mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 07:48:02 +00:00
feat(Deps/g3dlite): replace deprecated is_pod with is_standard_layout (#6894)
This commit is contained in:
4
deps/g3dlite/include/G3D/Array.h
vendored
4
deps/g3dlite/include/G3D/Array.h
vendored
@@ -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 */
|
/** 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) {
|
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<T>::value, "copyPOD called on non-POD type");
|
||||||
if (numAllocated < other.num) {
|
if (numAllocated < other.num) {
|
||||||
m_memoryManager->free(data);
|
m_memoryManager->free(data);
|
||||||
data = NULL;
|
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.
|
/** 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 */
|
This is only safe for POD types */
|
||||||
void appendPOD(const Array<T>& other) {
|
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<T>::value, "appendPOD called on non-POD type");
|
||||||
const size_t oldSize = num;
|
const size_t oldSize = num;
|
||||||
num += other.num;
|
num += other.num;
|
||||||
if (numAllocated < num) {
|
if (numAllocated < num) {
|
||||||
|
|||||||
Reference in New Issue
Block a user