diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-06-25 09:33:27 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-06-25 10:43:56 +0200 |
commit | ddfbbd346b522703a5b6f8d274a7f79983e5f319 (patch) | |
tree | 6ebd312287a1398b4b619b37045370cbeb83e1d1 /sources/shiboken2/ApiExtractor/typedatabase.cpp | |
parent | 2eced73f6b8dd9f568e84e78f786a0ec8d6dd429 (diff) |
shiboken: Introduce nullptr
Apply Fixits by Qt Creator with some amendments.
Change-Id: Ie8300ddb834adb8b649324562f2c912a4e8cf4ce
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/typedatabase.cpp')
-rw-r--r-- | sources/shiboken2/ApiExtractor/typedatabase.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sources/shiboken2/ApiExtractor/typedatabase.cpp b/sources/shiboken2/ApiExtractor/typedatabase.cpp index 6a5e8d8ba..279be9dc0 100644 --- a/sources/shiboken2/ApiExtractor/typedatabase.cpp +++ b/sources/shiboken2/ApiExtractor/typedatabase.cpp @@ -68,7 +68,7 @@ TypeDatabase::~TypeDatabase() TypeDatabase* TypeDatabase::instance(bool newInstance) { - static TypeDatabase* db = 0; + static TypeDatabase *db = nullptr; if (!db || newInstance) { if (db) delete db; @@ -163,7 +163,7 @@ ContainerTypeEntry* TypeDatabase::findContainerType(const QString &name) const TypeEntry* type_entry = findType(template_name); if (type_entry && type_entry->isContainer()) return static_cast<ContainerTypeEntry*>(type_entry); - return 0; + return nullptr; } static bool inline useType(const TypeEntry *t) @@ -179,7 +179,7 @@ FunctionTypeEntry* TypeDatabase::findFunctionType(const QString& name) const if (entry->type() == TypeEntry::FunctionType && useType(entry)) return static_cast<FunctionTypeEntry*>(entry); } - return 0; + return nullptr; } void TypeDatabase::addTypeSystemType(const TypeSystemTypeEntry *e) @@ -598,7 +598,7 @@ PrimitiveTypeEntry *TypeDatabase::findPrimitiveType(const QString& name) const } } - return 0; + return nullptr; } ComplexTypeEntry* TypeDatabase::findComplexType(const QString& name) const @@ -608,7 +608,7 @@ ComplexTypeEntry* TypeDatabase::findComplexType(const QString& name) const if (entry->isComplex() && useType(entry)) return static_cast<ComplexTypeEntry*>(entry); } - return 0; + return nullptr; } ObjectTypeEntry* TypeDatabase::findObjectType(const QString& name) const @@ -618,7 +618,7 @@ ObjectTypeEntry* TypeDatabase::findObjectType(const QString& name) const if (entry && entry->isObject() && useType(entry)) return static_cast<ObjectTypeEntry*>(entry); } - return 0; + return nullptr; } NamespaceTypeEntryList TypeDatabase::findNamespaceTypes(const QString& name) const |