diff options
author | Milian Wolff <milian.wolff@kdab.com> | 2015-05-30 23:19:21 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-07-13 22:27:01 +0000 |
commit | c19e67eb73c8db6a2d30a1260779d3221083382c (patch) | |
tree | c0ab09ecb5520310049601a847ce07bf66ddfad1 /src/tools/moc/preprocessor.h | |
parent | 4efd2ebb27bf0ed2d2a9f472c5b163640be195e6 (diff) | |
download | qtbase-c19e67eb73c8db6a2d30a1260779d3221083382c.tar.gz |
Optimize moc: Remove temporary allocations during macro expansion.
Previously, a temporary list was allocated and then fed into the
bigger list of results. Now, we push data into the final list
directly, removing the overhead of the temporary allocation.
Change-Id: I9bea0fd3c23b1434b4be2728c60ac22a66908efc
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Diffstat (limited to 'src/tools/moc/preprocessor.h')
-rw-r--r-- | src/tools/moc/preprocessor.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/moc/preprocessor.h b/src/tools/moc/preprocessor.h index 28691d316b..8d3bf4edbe 100644 --- a/src/tools/moc/preprocessor.h +++ b/src/tools/moc/preprocessor.h @@ -76,7 +76,7 @@ public: void substituteUntilNewline(Symbols &substituted); static Symbols macroExpandIdentifier(Preprocessor *that, SymbolStack &symbols, int lineNum, QByteArray *macroName); - static Symbols macroExpand(Preprocessor *that, Symbols &toExpand, int &index, int lineNum, bool one, + static void macroExpand(Symbols *into, Preprocessor *that, Symbols &toExpand, int &index, int lineNum, bool one, const QSet<QByteArray> &excludeSymbols = QSet<QByteArray>()); int evaluateCondition(); |