aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/ftw
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-06-26 10:55:36 +0200
committerMarc Mutz <marc.mutz@qt.io>2023-06-26 16:23:23 +0200
commitd57d71dec0d860d845f0f0e9b3810c5eff3f7067 (patch)
tree3b997088f938e66afe31fab9609507ef2966ded2 /src/qml/qml/ftw
parent7381110745572478ffa3c68000574bc4ccb2396c (diff)
QRecyclePool: remove the nullary New() method
It used default-initialization (new T), not value-initialization (new T()). If a caller were to depend on this, the intended cleanup (replacing the overload with a variadic template) would change semantics. Pick-to: 6.6 6.5 Change-Id: I1b1d7966d6499af37203415faa52b0824d0c3574 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/qml/qml/ftw')
-rw-r--r--src/qml/qml/ftw/qrecyclepool_p.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/qml/qml/ftw/qrecyclepool_p.h b/src/qml/qml/ftw/qrecyclepool_p.h
index c27cc63d9a..5e9f7759a5 100644
--- a/src/qml/qml/ftw/qrecyclepool_p.h
+++ b/src/qml/qml/ftw/qrecyclepool_p.h
@@ -67,7 +67,7 @@ public:
inline QRecyclePool();
inline ~QRecyclePool();
- inline T *New();
+ inline T *New() = delete;
template<typename T1>
inline T *New(const T1 &);
template<typename T1>
@@ -93,13 +93,6 @@ QRecyclePool<T, Step>::~QRecyclePool()
}
template<typename T, int Step>
-T *QRecyclePool<T, Step>::New()
-{
- T *rv = d->allocate();
- return new (rv) T;
-}
-
-template<typename T, int Step>
template<typename T1>
T *QRecyclePool<T, Step>::New(const T1 &a)
{