diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-01-13 15:02:22 +0100 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-02-04 16:40:43 +0100 |
| commit | 174dcd4f6c0159f29189f01bc38f42d804886c57 (patch) | |
| tree | fbeb73bf0cfb418817178f9030d3c5fca2721cd3 /sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp | |
| parent | 94df0160e5891eb63191c6548c9b4db7d2dac628 (diff) | |
shiboken: Small code cleanup
Fix some left-over nullptr issues, C-style casts and some signedness
issues.
Remove some unused functions and parameters. Remove empty statements.
Add defined() around macros, fixing warnings like:
warning: '_WINDOWS' is not defined, evaluates to 0
Change-Id: Idaa4334cb0edb3661ca766c248ec18ab85b0ee8e
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp')
| -rw-r--r-- | sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp b/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp index e48d2b17c..59ea3b079 100644 --- a/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp +++ b/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp @@ -270,7 +270,7 @@ void AbstractMetaBuilderPrivate::registerToStringCapability(const FunctionModelI const ArgumentModelItem &arg = arguments.at(1); if (AbstractMetaClass *cls = argumentToClass(arg, currentClass)) { if (arg->type().indirections() < 2) - cls->setToStringCapability(true, arg->type().indirections()); + cls->setToStringCapability(true, int(arg->type().indirections())); } } } @@ -1287,14 +1287,6 @@ void AbstractMetaBuilderPrivate::fixReturnTypeOfConversionOperator(AbstractMetaF metaFunction->replaceType(metaType); } -static bool _compareAbstractMetaTypes(const AbstractMetaType *type, - const AbstractMetaType *other, - AbstractMetaType::ComparisonFlags flags = {}) -{ - return (type != nullptr) == (other != nullptr) - && (type == nullptr || type->compare(*other, flags)); -} - AbstractMetaFunctionList AbstractMetaBuilderPrivate::classFunctionList(const ScopeModelItem &scopeItem, AbstractMetaClass::Attributes *constructorAttributes, AbstractMetaClass *currentClass) |
