diff options
| author | Aurélien Brooke <aurelien@bahiasoft.fr> | 2025-07-18 16:20:16 +0200 |
|---|---|---|
| committer | Aurélien Brooke <aurelien@bahiasoft.fr> | 2025-07-18 16:51:47 +0200 |
| commit | af8e6f8f37b113965aa728ca63a528e5c786bf5c (patch) | |
| tree | 3ec45e8d9419b88c79cc30a6d816bf79c4ba5f91 /src/tools/moc/preprocessor.cpp | |
| parent | cc5965b266e0803c5bd138083ac620274a275710 (diff) | |
moc: avoid unnecessary detachments of the SymbolStack
The hasNext() and next() functions frequently call QStack<T>::top(),
which is not const in this context. As a result, this causes unnecessary
detachments of the underlying QList.
Add a helper member function constTop() that ensures we access the top()
without making temporary copies of the whole SymbolStack.
Change-Id: I7801296d38192657fdc84a714de1774a42392330
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/tools/moc/preprocessor.cpp')
0 files changed, 0 insertions, 0 deletions
