forked from qt-creator/qt-creator
ClangSupport: Use simpler structures in some cases
The patch is mostly mechanical, but contains also a few spurious changes from values references for some local variables, foreach -> ranged for etc that I coulnd't resist. Change-Id: I58f0bd972546895eb318607cbfbd7ac35caf3f23 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -207,7 +207,7 @@ int clangColumn(const QTextBlock &line, int cppEditorColumn)
|
||||
|
||||
CPlusPlus::Icons::IconType iconTypeForToken(const ClangBackEnd::TokenInfoContainer &token)
|
||||
{
|
||||
const ClangBackEnd::ExtraInfo &extraInfo = token.extraInfo();
|
||||
const ClangBackEnd::ExtraInfo &extraInfo = token.extraInfo;
|
||||
if (extraInfo.signal)
|
||||
return CPlusPlus::Icons::SignalIconType;
|
||||
|
||||
@@ -224,7 +224,7 @@ CPlusPlus::Icons::IconType iconTypeForToken(const ClangBackEnd::TokenInfoContain
|
||||
}
|
||||
}
|
||||
|
||||
ClangBackEnd::HighlightingType mainType = token.types().mainHighlightingType;
|
||||
ClangBackEnd::HighlightingType mainType = token.types.mainHighlightingType;
|
||||
|
||||
if (mainType == ClangBackEnd::HighlightingType::Keyword)
|
||||
return CPlusPlus::Icons::KeywordIconType;
|
||||
@@ -241,7 +241,7 @@ CPlusPlus::Icons::IconType iconTypeForToken(const ClangBackEnd::TokenInfoContain
|
||||
return CPlusPlus::Icons::EnumeratorIconType;
|
||||
|
||||
if (mainType == ClangBackEnd::HighlightingType::Type) {
|
||||
const ClangBackEnd::MixinHighlightingTypes &types = token.types().mixinHighlightingTypes;
|
||||
const ClangBackEnd::MixinHighlightingTypes &types = token.types.mixinHighlightingTypes;
|
||||
if (types.contains(ClangBackEnd::HighlightingType::Enum))
|
||||
return CPlusPlus::Icons::EnumIconType;
|
||||
if (types.contains(ClangBackEnd::HighlightingType::Struct))
|
||||
|
||||
Reference in New Issue
Block a user