From d15222fbaf2a94ebaef42d90060c73fdad6fe2ca Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 9 Mar 2022 15:51:56 +0100 Subject: [PATCH] QFlatMap: fix warning -Wunused-but-set-variable (GCC) in remove_if() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Amends 6f5c78fe3d445f1c6c8738f9cedb9dbd847645fa. Change-Id: I01a474f8ccb9de7d7b76a33a950542e38edc78e4 Reviewed-by: Fabian Kosmale Reviewed-by: MÃ¥rten Nordheim --- src/corelib/tools/qflatmap_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qflatmap_p.h b/src/corelib/tools/qflatmap_p.h index 7500cfb42d..807a68ffaa 100644 --- a/src/corelib/tools/qflatmap_p.h +++ b/src/corelib/tools/qflatmap_p.h @@ -867,7 +867,7 @@ public: size_type remove_if(Predicate pred) { const auto indirect_call_to_pred = [pred = std::move(pred)](iterator it) { - auto dependent_false = [](auto &&...) { return false; }; + [[maybe_unused]] auto dependent_false = [](auto &&...) { return false; }; using Pair = decltype(*it); using K = decltype(it.key()); using V = decltype(it.value());