aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/clangparser/clangutils.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-09-27 09:43:04 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-09-29 11:50:52 +0200
commit6ab7d0b384b58c52faf924278f032e796ce42f07 (patch)
treee7b7e633bc3fec406c878a4d3614676ac064f701 /sources/shiboken6/ApiExtractor/clangparser/clangutils.cpp
parent61589ef35ee2ee7af52359940822a9d5f298a69f (diff)
Replace QPair by std::pair
Pick-to: 6.6 6.5 Change-Id: Ic64a2a2c162c54fbbfb6ddc5004ffe1944bfd37a Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/clangparser/clangutils.cpp')
-rw-r--r--sources/shiboken6/ApiExtractor/clangparser/clangutils.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/sources/shiboken6/ApiExtractor/clangparser/clangutils.cpp b/sources/shiboken6/ApiExtractor/clangparser/clangutils.cpp
index fbea76b41..68b10d5b4 100644
--- a/sources/shiboken6/ApiExtractor/clangparser/clangutils.cpp
+++ b/sources/shiboken6/ApiExtractor/clangparser/clangutils.cpp
@@ -79,8 +79,8 @@ CXString getFileNameFromLocation(const CXSourceLocation &location)
SourceRange getCursorRange(const CXCursor &cursor)
{
const CXSourceRange extent = clang_getCursorExtent(cursor);
- return qMakePair(getExpansionLocation(clang_getRangeStart(extent)),
- getExpansionLocation(clang_getRangeEnd(extent)));
+ return std::make_pair(getExpansionLocation(clang_getRangeStart(extent)),
+ getExpansionLocation(clang_getRangeEnd(extent)));
}
QString getCursorKindName(CXCursorKind cursorKind)
@@ -222,14 +222,14 @@ QList<Diagnostic> getDiagnostics(CXTranslationUnit tu)
return result;
}
-QPair<qsizetype, qsizetype>
+std::pair<qsizetype, qsizetype>
parseTemplateArgumentList(const QString &l,
const TemplateArgumentHandler &handler,
qsizetype from)
{
const auto ltPos = l.indexOf(u'<', from);
if (ltPos == - 1)
- return qMakePair(-1, -1);
+ return std::make_pair(-1, -1);
auto startPos = ltPos + 1;
int level = 1;
for (qsizetype p = startPos, end = l.size(); p < end; ) {
@@ -241,7 +241,7 @@ QPair<qsizetype, qsizetype>
++p;
if (c == '>') {
if (--level == 0)
- return qMakePair(ltPos, p);
+ return std::make_pair(ltPos, p);
// Skip over next ',': "a<b<c,d>,e>"
for (; p < end && (l.at(p).isSpace() || l.at(p) == u','); ++p) {}
}
@@ -257,7 +257,7 @@ QPair<qsizetype, qsizetype>
break;
}
}
- return qMakePair(-1, -1);
+ return std::make_pair(-1, -1);
}
CXDiagnosticSeverity maxSeverity(const QList<Diagnostic> &ds)