From df96d39c048a467213c6170dc8e225116f31a7e3 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 12 Jul 2023 17:45:57 +0200 Subject: [PATCH] ThreadPoolThreadReleaser: add Q_NODISCARD_CTOR QUIP: 19 Pick-to: 6.6 Change-Id: I465a2ef8edc103f0655a7732f3aaaf18748854c4 Reviewed-by: Thiago Macieira --- src/corelib/thread/qfutureinterface.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/corelib/thread/qfutureinterface.cpp b/src/corelib/thread/qfutureinterface.cpp index 0e39cd6da3..8f73dde253 100644 --- a/src/corelib/thread/qfutureinterface.cpp +++ b/src/corelib/thread/qfutureinterface.cpp @@ -30,6 +30,7 @@ namespace { class ThreadPoolThreadReleaser { QThreadPool *m_pool; public: + Q_NODISCARD_CTOR explicit ThreadPoolThreadReleaser(QThreadPool *pool) : m_pool(pool) { if (pool) pool->releaseThread(); }