diff options
author | Milian Wolff <milian.wolff@kdab.com> | 2015-05-31 00:04:09 +0200 |
---|---|---|
committer | Milian Wolff <milian.wolff@kdab.com> | 2015-07-22 15:25:41 +0000 |
commit | c05f2d04f2ac359f486d2be4f0814e0f5b1d0b8f (patch) | |
tree | d26723c52936e58d6c4e19532bd26ee0c778bd62 /src | |
parent | aa42a1a67e7f8cd9e4aa1577861189abb98a25e0 (diff) |
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) <ogoffart@woboq.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/moc/preprocessor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<Symbols> arguments; + QVarLengthArray<Symbols, 5> arguments; while (symbols.hasNext()) { Symbols argument; // strip leading space |