diff options
author | hjk <hjk@qt.io> | 2022-08-10 09:41:42 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2022-08-10 14:45:28 +0000 |
commit | 0197a62fcf6742f9fd444a1d8bb473299095293d (patch) | |
tree | c03375990cc1a33ac37589b264765bd7ba046096 /src/plugins/cppeditor/cppcompletionassist.cpp | |
parent | f9ce879b6119b713d1923ad697b23a82a2fe1840 (diff) | |
download | qt-creator-0197a62fcf6742f9fd444a1d8bb473299095293d.tar.gz |
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>
Diffstat (limited to 'src/plugins/cppeditor/cppcompletionassist.cpp')
-rw-r--r-- | src/plugins/cppeditor/cppcompletionassist.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/cppeditor/cppcompletionassist.cpp b/src/plugins/cppeditor/cppcompletionassist.cpp index 997945506e..e674864582 100644 --- a/src/plugins/cppeditor/cppcompletionassist.cpp +++ b/src/plugins/cppeditor/cppcompletionassist.cpp @@ -1892,8 +1892,7 @@ void InternalCppCompletionAssistProcessor::addMacros_helper(const Snapshot &snap for (const Document::Include &i : includes) addMacros_helper(snapshot, i.resolvedFileName(), processed, definedMacros); - const QList<CPlusPlus::Macro> macros = doc->definedMacros(); - for (const CPlusPlus::Macro ¯o : macros) { + for (const CPlusPlus::Macro ¯o : doc->definedMacros()) { const QString macroName = macro.nameToQString(); if (!macro.isHidden()) definedMacros->insert(macroName); |