From c05f2d04f2ac359f486d2be4f0814e0f5b1d0b8f Mon Sep 17 00:00:00 2001 From: Milian Wolff Date: Sun, 31 May 2015 00:04:09 +0200 Subject: Optimize moc: Preallocate space for list of arguments on the stack. This removes the temporary QList allocations. Change-Id: I1f255e94730202f719e0a97b9ab4a83e28b805c1 Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/tools/moc/preprocessor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/moc/preprocessor.cpp b/src/tools/moc/preprocessor.cpp index 17274f0877..adba0f9b9b 100644 --- a/src/tools/moc/preprocessor.cpp +++ b/src/tools/moc/preprocessor.cpp @@ -597,7 +597,7 @@ Symbols Preprocessor::macroExpandIdentifier(Preprocessor *that, SymbolStack &sym syms.last().lineNum = lineNum; return syms; } - QList arguments; + QVarLengthArray arguments; while (symbols.hasNext()) { Symbols argument; // strip leading space -- cgit v1.2.3