aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/generator/shiboken2/cppgenerator.cpp')
-rw-r--r--sources/shiboken2/generator/shiboken2/cppgenerator.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
index 7743d50a2..6572fca9a 100644
--- a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
+++ b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
@@ -1061,7 +1061,7 @@ void CppGenerator::writeVirtualMethodNative(QTextStream &s,
QString argConv;
QTextStream ac(&argConv);
- auto argType = static_cast<const PrimitiveTypeEntry *>(arg->type()->typeEntry());
+ const auto *argType = arg->type()->typeEntry();
bool convert = argType->isObject()
|| argType->isValue()
|| arg->type()->isValuePointer()
@@ -1070,11 +1070,11 @@ void CppGenerator::writeVirtualMethodNative(QTextStream &s,
|| argType->isEnum()
|| argType->isContainer()
|| arg->type()->referenceType() == LValueReference;
-
if (!convert && argType->isPrimitive()) {
- if (argType->basicReferencedTypeEntry())
- argType = argType->basicReferencedTypeEntry();
- convert = !m_formatUnits.contains(argType->name());
+ const auto *pte = static_cast<const PrimitiveTypeEntry *>(argType);
+ if (pte->basicReferencedTypeEntry())
+ pte = pte->basicReferencedTypeEntry();
+ convert = !m_formatUnits.contains(pte->name());
}
Indentor nested;