diff options
Diffstat (limited to 'sources/shiboken2/generator/generator.cpp')
-rw-r--r-- | sources/shiboken2/generator/generator.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sources/shiboken2/generator/generator.cpp b/sources/shiboken2/generator/generator.cpp index c0a2af2ee..dd56ab7cd 100644 --- a/sources/shiboken2/generator/generator.cpp +++ b/sources/shiboken2/generator/generator.cpp @@ -229,7 +229,7 @@ QString Generator::getSimplifiedContainerTypeName(const AbstractMetaType *type) // Strip a "const QSharedPtr<const Foo> &" or similar to "QSharedPtr<Foo>" (PYSIDE-1016/454) const AbstractMetaType *canonicalSmartPtrInstantiation(const AbstractMetaType *type) { - AbstractMetaTypeList instantiations = type->instantiations(); + const AbstractMetaTypeList &instantiations = type->instantiations(); Q_ASSERT(instantiations.size() == 1); const bool needsFix = type->isConstant() || type->referenceType() != NoReference; const bool pointeeNeedsFix = instantiations.constFirst()->isConstant(); @@ -256,8 +256,7 @@ void Generator::addInstantiatedContainersAndSmartPointers(const AbstractMetaType { if (!type) return; - const AbstractMetaTypeList &instantiations = type->instantiations(); - for (const AbstractMetaType *t : instantiations) + for (const auto *t : type->instantiations()) addInstantiatedContainersAndSmartPointers(t, context); const auto typeEntry = type->typeEntry(); const bool isContainer = typeEntry->isContainer(); |