Fix build on macOS for older Xcode

Amends 05430afdcf.

Change-Id: I3e0017ecdd3656a7a777819a2bce269dd211ee5e
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
Christian Stenger
2024-09-17 08:31:38 +02:00
parent 42ba58e29d
commit ef8c86693e
2 changed files with 2 additions and 2 deletions

View File

@@ -385,7 +385,7 @@ bool GenericBuildSystem::renameFiles(Node *, const FilePairs &filesToRename, Fil
bool success = true; bool success = true;
for (const auto &[oldFilePath, newFilePath] : filesToRename) { for (const auto &[oldFilePath, newFilePath] : filesToRename) {
const auto fail = [&] { const auto fail = [&, oldFilePath = oldFilePath] {
success = false; success = false;
if (notRenamed) if (notRenamed)
*notRenamed << oldFilePath; *notRenamed << oldFilePath;

View File

@@ -636,7 +636,7 @@ bool QmlBuildSystem::renameFiles(Node *context,
bool success = true; bool success = true;
for (const auto &[oldFilePath, newFilePath] : filesToRename) { for (const auto &[oldFilePath, newFilePath] : filesToRename) {
const auto fail = [&] { const auto fail = [&, oldFilePath = oldFilePath] {
success = false; success = false;
if (notRenamed) if (notRenamed)
*notRenamed << oldFilePath; *notRenamed << oldFilePath;