CPlusPlus: Microoptimizations

Inline some simple accessors, return references instead of copies in
some getters,

Change-Id: I136574823c79ad0c63ed354b78e1ad83908e7ae5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2022-08-10 09:41:42 +02:00
parent f9ce879b61
commit 0197a62fcf
13 changed files with 36 additions and 98 deletions

View File

@@ -111,9 +111,7 @@ TestCases QtTestParser::testCases(const CppEditor::CppModelManager *modelManager
if (document.isNull())
return {};
const QList<CPlusPlus::Document::MacroUse> macros = document->macroUses();
for (const CPlusPlus::Document::MacroUse &macro : macros) {
for (const CPlusPlus::Document::MacroUse &macro : document->macroUses()) {
if (!macro.isFunctionLike())
continue;
const QByteArray name = macro.macro().name();