From de06aece829130c880f89ca8512fd64d17e5f4d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 26 Apr 2024 11:40:59 +0200 Subject: [PATCH] Fix GCC 14 -Wtemplate-id-cdtor warnings Fixes #91206. (cherry picked from commit a8ff47b6d6b5070b8247dfed85135b71a4a07cdf) --- core/templates/ring_buffer.h | 4 ++-- core/templates/safe_refcount.h | 2 +- thirdparty/clipper2/gcc14-warning.patch | 22 +++++++++++++++++++ .../clipper2/include/clipper2/clipper.core.h | 4 ++-- 4 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 thirdparty/clipper2/gcc14-warning.patch diff --git a/core/templates/ring_buffer.h b/core/templates/ring_buffer.h index d878894946e..25c4c9941d7 100644 --- a/core/templates/ring_buffer.h +++ b/core/templates/ring_buffer.h @@ -211,10 +211,10 @@ public: size_mask = mask; } - RingBuffer(int p_power = 0) { + RingBuffer(int p_power = 0) { resize(p_power); } - ~RingBuffer() {} + ~RingBuffer() {} }; #endif // RING_BUFFER_H diff --git a/core/templates/safe_refcount.h b/core/templates/safe_refcount.h index 20fb0c65012..454dd17f732 100644 --- a/core/templates/safe_refcount.h +++ b/core/templates/safe_refcount.h @@ -146,7 +146,7 @@ public: } } - _ALWAYS_INLINE_ explicit SafeNumeric(T p_value = static_cast(0)) { + _ALWAYS_INLINE_ explicit SafeNumeric(T p_value = static_cast(0)) { set(p_value); } }; diff --git a/thirdparty/clipper2/gcc14-warning.patch b/thirdparty/clipper2/gcc14-warning.patch new file mode 100644 index 00000000000..a4f06ef37ea --- /dev/null +++ b/thirdparty/clipper2/gcc14-warning.patch @@ -0,0 +1,22 @@ +diff --git a/thirdparty/clipper2/include/clipper2/clipper.core.h b/thirdparty/clipper2/include/clipper2/clipper.core.h +index a77cdad5f4..0de7c3720e 100644 +--- a/thirdparty/clipper2/include/clipper2/clipper.core.h ++++ b/thirdparty/clipper2/include/clipper2/clipper.core.h +@@ -138,7 +138,7 @@ namespace Clipper2Lib + } + + template +- explicit Point(const Point& p) ++ explicit Point(const Point& p) + { + Init(p.x, p.y, p.z); + } +@@ -180,7 +180,7 @@ namespace Clipper2Lib + Point(const T2 x_, const T2 y_) { Init(x_, y_); } + + template +- explicit Point(const Point& p) { Init(p.x, p.y); } ++ explicit Point(const Point& p) { Init(p.x, p.y); } + + Point operator * (const double scale) const + { diff --git a/thirdparty/clipper2/include/clipper2/clipper.core.h b/thirdparty/clipper2/include/clipper2/clipper.core.h index 086d1b659c9..a43ef1f10d0 100644 --- a/thirdparty/clipper2/include/clipper2/clipper.core.h +++ b/thirdparty/clipper2/include/clipper2/clipper.core.h @@ -122,7 +122,7 @@ namespace Clipper2Lib } template - explicit Point(const Point& p) + explicit Point(const Point& p) { Init(p.x, p.y, p.z); } @@ -163,7 +163,7 @@ namespace Clipper2Lib Point(const T2 x_, const T2 y_) { Init(x_, y_); } template - explicit Point(const Point& p) { Init(p.x, p.y); } + explicit Point(const Point& p) { Init(p.x, p.y); } Point operator * (const double scale) const {