summaryrefslogtreecommitdiffstats
path: root/src/tools/moc/preprocessor.cpp
diff options
context:
space:
mode:
authorAurélien Brooke <aurelien@bahiasoft.fr>2025-07-18 16:08:28 +0200
committerAurélien Brooke <aurelien@bahiasoft.fr>2025-07-21 19:40:25 +0200
commit16b9faaba4666d7a20e74eb164a5c0389cd57d76 (patch)
treeb2be4eef43f095377476e8869b702d6e9cd945ba /src/tools/moc/preprocessor.cpp
parent092f2f34adb0b89b91b4e978e10107eceefe8da9 (diff)
moc: use the new QStack::push(T&&) function to push on the symbols stack
This avoids making costly copies of SafeSymbols. Change-Id: Ib29dec98ced43712ce758ffe4caaf123bd509dd1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/tools/moc/preprocessor.cpp')
-rw-r--r--src/tools/moc/preprocessor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/moc/preprocessor.cpp b/src/tools/moc/preprocessor.cpp
index 8b329f8cff2..fd2d196a7a5 100644
--- a/src/tools/moc/preprocessor.cpp
+++ b/src/tools/moc/preprocessor.cpp
@@ -515,7 +515,7 @@ void Preprocessor::macroExpand(Symbols *into, Preprocessor *that, const Symbols
sf.symbols = toExpand;
sf.index = index;
sf.excludedSymbols = excludeSymbols;
- symbols.push(sf);
+ symbols.push(std::move(sf));
if (toExpand.isEmpty())
return;
@@ -534,7 +534,7 @@ void Preprocessor::macroExpand(Symbols *into, Preprocessor *that, const Symbols
sf.symbols = newSyms;
sf.index = 0;
sf.expandedMacro = macro;
- symbols.push(sf);
+ symbols.push(std::move(sf));
}
if (!symbols.hasNext() || (one && symbols.size() == 1))
break;