From dd0dc6caa5dab5f7632869ff74ab1db4a9031de2 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 16 Sep 2021 14:46:07 +0200 Subject: shiboken6: Remove unused parameter from the check function helpers bool genericNumberType appears to be unused. Task-number: PYSIDE-1660 Change-Id: Icc3f51fb3776199756328234de026bd289dc6f04 Reviewed-by: Christian Tismer --- sources/shiboken6/generator/shiboken/shibokengenerator.cpp | 11 +++++------ sources/shiboken6/generator/shiboken/shibokengenerator.h | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/sources/shiboken6/generator/shiboken/shibokengenerator.cpp b/sources/shiboken6/generator/shiboken/shibokengenerator.cpp index faeb860f6..3f5b6e5c8 100644 --- a/sources/shiboken6/generator/shiboken/shibokengenerator.cpp +++ b/sources/shiboken6/generator/shiboken/shibokengenerator.cpp @@ -993,8 +993,7 @@ bool ShibokenGenerator::isNullPtr(const QString &value) || value == QLatin1String("NULLPTR") || value == QLatin1String("{}"); } -QString ShibokenGenerator::cpythonCheckFunction(AbstractMetaType metaType, - bool genericNumberType) const +QString ShibokenGenerator::cpythonCheckFunction(AbstractMetaType metaType) const { if (metaType.typeEntry()->isCustom()) { auto customCheckResult = guessCPythonCheckFunction(metaType.typeEntry()->name()); @@ -1009,7 +1008,7 @@ QString ShibokenGenerator::cpythonCheckFunction(AbstractMetaType metaType, return QLatin1String("Shiboken::String::check"); if (metaType.isVoidPointer()) return QLatin1String("PyObject_Check"); - return cpythonCheckFunction(metaType.typeEntry(), genericNumberType); + return cpythonCheckFunction(metaType.typeEntry()); } auto typeEntry = metaType.typeEntry(); if (typeEntry->isContainer()) { @@ -1056,16 +1055,16 @@ QString ShibokenGenerator::cpythonCheckFunction(AbstractMetaType metaType, } return typeCheck; } - return cpythonCheckFunction(typeEntry, genericNumberType); + return cpythonCheckFunction(typeEntry); } -QString ShibokenGenerator::cpythonCheckFunction(const TypeEntry *type, bool genericNumberType) const +QString ShibokenGenerator::cpythonCheckFunction(const TypeEntry *type) const { if (type->isCustom()) { AbstractMetaType metaType; auto customCheckResult = guessCPythonCheckFunction(type->name()); if (customCheckResult.type.has_value()) - return cpythonCheckFunction(customCheckResult.type.value(), genericNumberType); + return cpythonCheckFunction(customCheckResult.type.value()); return customCheckResult.checkFunction; } diff --git a/sources/shiboken6/generator/shiboken/shibokengenerator.h b/sources/shiboken6/generator/shiboken/shibokengenerator.h index 0ad4a5f79..03ebf2d2e 100644 --- a/sources/shiboken6/generator/shiboken/shibokengenerator.h +++ b/sources/shiboken6/generator/shiboken/shibokengenerator.h @@ -237,8 +237,8 @@ protected: static QString cpythonTypeName(const TypeEntry *type); static QString cpythonTypeNameExt(const TypeEntry *type); static QString cpythonTypeNameExt(const AbstractMetaType &type) ; - QString cpythonCheckFunction(const TypeEntry *type, bool genericNumberType = false) const; - QString cpythonCheckFunction(AbstractMetaType metaType, bool genericNumberType = false) const; + QString cpythonCheckFunction(const TypeEntry *type) const; + QString cpythonCheckFunction(AbstractMetaType metaType) const; /** * Receives the argument \p type and tries to find the appropriate AbstractMetaType for it * or a custom type check. -- cgit v1.2.3