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:
Jarek Kobus
2022-09-30 13:17:36 +02:00
parent be9f6fea9b
commit afd1742f9f
4 changed files with 4 additions and 4 deletions

View File

@@ -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;

View File

@@ -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

View File

@@ -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});
}
}
}

View File

@@ -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;