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:
Kari Oikarinen 2019-11-15 09:37:05 +02:00
parent d7cb21ac08
commit 315c2c468e

View File

@ -67,7 +67,7 @@ void tst_QScopedGuard::exceptions()
bool caught = false; bool caught = false;
QT_TRY 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 QT_THROW(std::bad_alloc()); //if Qt compiled without exceptions this is noop
s_globalState = 100; s_globalState = 100;
} }