You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-28 16:07:14 +00:00
Merge pull request #52123 from lightspot21/fix-placement-new-warning
Silence false-positive warning for malformed placement new on GCC 11.1
This commit is contained in:
@@ -49,6 +49,12 @@ class VMap;
|
|||||||
SAFE_NUMERIC_TYPE_PUN_GUARANTEES(uint32_t)
|
SAFE_NUMERIC_TYPE_PUN_GUARANTEES(uint32_t)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Silence a false positive warning (see GH-52119).
|
||||||
|
#if defined(__GNUC__) && !defined(__clang__)
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wplacement-new"
|
||||||
|
#endif
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
class CowData {
|
class CowData {
|
||||||
template <class TV>
|
template <class TV>
|
||||||
@@ -380,4 +386,8 @@ CowData<T>::~CowData() {
|
|||||||
_unref(_ptr);
|
_unref(_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && !defined(__clang__)
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // COWDATA_H
|
#endif // COWDATA_H
|
||||||
|
|||||||
Reference in New Issue
Block a user