Fix warning in test: unused capture in lambda

Change-Id: Ifa9bab843feb670f8400c26fd78f96db55bfd79e
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: David Skoland <david.skoland@qt.io>
This commit is contained in:
Volker Hilsheimer 2020-10-15 17:06:34 +02:00
parent aa442e9450
commit faf7fd577f

View File

@ -2438,7 +2438,7 @@ void tst_QArrayData::exceptionSafetyPrimitives_constructor()
WatcherScope scope; Q_UNUSED(scope); WatcherScope scope; Q_UNUSED(scope);
try { try {
ThrowingType::throwOnce = throwOnNthConstruction; ThrowingType::throwOnce = throwOnNthConstruction;
doConstruction(data, data.end(), [&source, &value] (Constructor &ctor) { doConstruction(data, data.end(), [&value] (Constructor &ctor) {
return ctor.clone(5, value); return ctor.clone(5, value);
}); });
} catch (const std::runtime_error &e) { } catch (const std::runtime_error &e) {