diff options
author | Kari Oikarinen <kari.oikarinen@qt.io> | 2019-11-15 09:37:05 +0200 |
---|---|---|
committer | Kari Oikarinen <kari.oikarinen@qt.io> | 2019-11-19 18:33:43 +0200 |
commit | 315c2c468e504b83d616e2068bd4f7688ff58cf7 (patch) | |
tree | 72167d2df002820a1c0b8a79616624dee669664f | |
parent | d7cb21ac085117f879a8aa1d7727b2ca52d3353d (diff) | |
download | qtbase-315c2c468e504b83d616e2068bd4f7688ff58cf7.tar.gz |
tst_QScopeGuard: Remove unused lambda capture
qt5/qtbase/tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp:100:38:
warning: lambda capture 'caught' is not used [-Wunused-lambda-capture]
auto cleanup = qScopeGuard([&caught] { s_globalState++; });
~^~~~~~
Change-Id: I0d9b85896594f3ea35c8003846d4ac7ab5e33d16
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp b/tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp index f95d48f042..01181ce20e 100644 --- a/tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp +++ b/tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp @@ -67,7 +67,7 @@ void tst_QScopedGuard::exceptions() bool caught = false; QT_TRY { - auto cleanup = qScopeGuard([&caught] { s_globalState++; }); + auto cleanup = qScopeGuard([] { s_globalState++; }); QT_THROW(std::bad_alloc()); //if Qt compiled without exceptions this is noop s_globalState = 100; } |