tst_QScopeGuard: Remove unused lambda capture
qt5/qtbase/tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp💯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>
This commit is contained in:
parent
d7cb21ac08
commit
315c2c468e
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user