aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/generator/shiboken2/overloaddata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/generator/shiboken2/overloaddata.cpp')
-rw-r--r--sources/shiboken2/generator/shiboken2/overloaddata.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/sources/shiboken2/generator/shiboken2/overloaddata.cpp b/sources/shiboken2/generator/shiboken2/overloaddata.cpp
index 9f79060da..193384853 100644
--- a/sources/shiboken2/generator/shiboken2/overloaddata.cpp
+++ b/sources/shiboken2/generator/shiboken2/overloaddata.cpp
@@ -57,8 +57,7 @@ static QString getTypeName(const AbstractMetaType *type)
QString typeName = typeEntry->name();
if (typeEntry->isContainer()) {
QStringList types;
- const AbstractMetaTypeList &instantiations = type->instantiations();
- for (const AbstractMetaType *cType : instantiations) {
+ for (const auto *cType : type->instantiations()) {
const TypeEntry *typeEntry = getReferencedTypeEntry(cType->typeEntry());
types << typeEntry->name();
}
@@ -147,8 +146,7 @@ static QString getImplicitConversionTypeName(const AbstractMetaType *containerTy
impConv = getTypeName(function->arguments().constFirst()->type());
QStringList types;
- const AbstractMetaTypeList &instantiations = containerType->instantiations();
- for (const AbstractMetaType *otherType : instantiations)
+ for (const auto *otherType : containerType->instantiations())
types << (otherType == instantiation ? impConv : getTypeName(otherType));
return containerType->typeEntry()->qualifiedCppName() + QLatin1Char('<')
@@ -258,8 +256,7 @@ void OverloadData::sortNextOverloads()
qstringIndex = sortData.lastProcessedItemId();
}
- const AbstractMetaTypeList &instantiations = ov->argType()->instantiations();
- for (const AbstractMetaType *instantiation : instantiations) {
+ for (const auto *instantiation : ov->argType()->instantiations()) {
// Add dependencies for type instantiation of container.
QString typeName = getTypeName(instantiation);
sortData.mapType(typeName);
@@ -346,8 +343,7 @@ void OverloadData::sortNextOverloads()
}
// Process template instantiations
- const AbstractMetaTypeList &instantiations = targetType->instantiations();
- for (const AbstractMetaType *instantiation : instantiations) {
+ for (const auto *instantiation : targetType->instantiations()) {
if (sortData.map.contains(getTypeName(instantiation))) {
int convertible = sortData.map[getTypeName(instantiation)];