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>
This commit is contained in:
parent
aa42a1a67e
commit
c05f2d04f2
@ -597,7 +597,7 @@ Symbols Preprocessor::macroExpandIdentifier(Preprocessor *that, SymbolStack &sym
|
|||||||
syms.last().lineNum = lineNum;
|
syms.last().lineNum = lineNum;
|
||||||
return syms;
|
return syms;
|
||||||
}
|
}
|
||||||
QList<Symbols> arguments;
|
QVarLengthArray<Symbols, 5> arguments;
|
||||||
while (symbols.hasNext()) {
|
while (symbols.hasNext()) {
|
||||||
Symbols argument;
|
Symbols argument;
|
||||||
// strip leading space
|
// strip leading space
|
||||||
|
Loading…
x
Reference in New Issue
Block a user