forked from qt-creator/qt-creator
CPlusPlus: Limit the usage of qMakePair
Change-Id: Ica59c320fb700369e968bb03a93deff34eb7ffb7 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -792,7 +792,7 @@ QList<Snapshot::IncludeLocation> Snapshot::includeLocationsOfDocument(const QStr
|
||||
const QList<Document::Include> includeFiles = doc->resolvedIncludes();
|
||||
for (const Document::Include &includeFile : includeFiles) {
|
||||
if (includeFile.resolvedFileName() == fileName)
|
||||
result.append(qMakePair(doc, includeFile.line()));
|
||||
result.push_back({doc, includeFile.line()});
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
@@ -404,7 +404,7 @@ SubstitutionMap::~SubstitutionMap()
|
||||
|
||||
void SubstitutionMap::bind(const Name *name, const FullySpecifiedType &ty)
|
||||
{
|
||||
_map.append(qMakePair(name, ty));
|
||||
_map.push_back({name, ty});
|
||||
}
|
||||
|
||||
FullySpecifiedType SubstitutionMap::apply(const Name *name, Rewrite *) const
|
||||
|
@@ -389,7 +389,7 @@ FullySpecifiedType DeprecatedGenTemplateInstance::instantiate(const Name *classN
|
||||
|
||||
if (templArgName && templArgName->identifier()) {
|
||||
const Identifier *templArgId = templArgName->identifier();
|
||||
subst.append(qMakePair(templArgId, templArgTy));
|
||||
subst.push_back({templArgId, templArgTy});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1420,7 +1420,7 @@ void Preprocessor::preprocess(const QString &fileName, const QByteArray &source,
|
||||
trackedLine = tk.lineno;
|
||||
trackedColumn = unsigned(computeDistance(tk, true));
|
||||
}
|
||||
m_state.m_expandedTokensInfo.append(qMakePair(trackedLine, trackedColumn));
|
||||
m_state.m_expandedTokensInfo.push_back({trackedLine, trackedColumn});
|
||||
} else if (m_state.m_expansionStatus == JustFinishedExpansion) {
|
||||
m_state.setExpansionStatus(NotExpanding);
|
||||
macroExpanded = true;
|
||||
|
Reference in New Issue
Block a user