From 0cfcebb955099498c483a9dcc55863f833ba550f Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 25 Apr 2017 09:24:17 +0200 Subject: [PATCH] QThread: fix headersclean with C++17 GCC's -Wshadow complained about the re-use of 'args' as the parameter for the lambda. Fix by renaming it to largs (lambda-args) instead. Change-Id: Ia9e65b82b98ee56181d754868354988399496eef Reviewed-by: Giuseppe D'Angelo --- src/corelib/thread/qthread.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/thread/qthread.h b/src/corelib/thread/qthread.h index 801bbfe02a..a061394deb 100644 --- a/src/corelib/thread/qthread.h +++ b/src/corelib/thread/qthread.h @@ -169,9 +169,9 @@ public: template explicit QThreadCreateThread(Function &&f, Args &&... args) : m_future(std::async(std::launch::deferred, - [f = static_cast::type>(std::forward(f))](auto &&... args) mutable -> void + [f = static_cast::type>(std::forward(f))](auto &&... largs) mutable -> void { - (void)std::invoke(std::move(f), std::forward(args)...); + (void)std::invoke(std::move(f), std::forward(largs)...); }, std::forward(args)...)) { }