aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-09-16 14:46:07 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-09-17 09:40:43 +0200
commitdd0dc6caa5dab5f7632869ff74ab1db4a9031de2 (patch)
tree7417af0a8b2169e2bab26268b72941975c4d5ecb
parent67ed2317b0b9d45eb5d0faf822411f4760d3638d (diff)
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 <tismer@stackless.com>
-rw-r--r--sources/shiboken6/generator/shiboken/shibokengenerator.cpp11
-rw-r--r--sources/shiboken6/generator/shiboken/shibokengenerator.h4
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.