aboutsummaryrefslogtreecommitdiffstats
path: root/sources
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-11-22 14:43:43 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-12-03 08:24:27 +0100
commitef7905b7486750b2dae8b417cffd30cd1b8efdd7 (patch)
treeef699294567c472cbcfa6b7de5e65e5542d4cfa8 /sources
parent3d2c0a4a458bd63e13cb1ecd15d465256cfdae2d (diff)
shiboken: Avoid initializing QFlags with 0 or nullptr
Preemptively fix warnings: sources/shiboken2/ApiExtractor/abstractmetalang.cpp:531:28: warning: 'constexpr QFlags<T>::QFlags(QFlags<T>::Zero) [with Enum = AbstractMetaFunction::CompareResultFlag; QFlags<T>::Zero = int QFlags<AbstractMetaFunction::CompareResultFlag>::Private::*]' is deprecated: Use default constructor instead [-Wdeprecated-declarations] sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp:1234:47: warning: 'constexpr QFlags<T>::QFlags(QFlags<T>::Zero) [with Enum = AbstractMetaAttributes::Attribute; QFlags<T>::Zero = int QFlags<AbstractMetaAttributes::Attribute>::Private::*]' is deprecated: Use default constructor instead [-Wdeprecated-declarations] sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp:1332:30: warning: 'constexpr QFlags<T>::QFlags(QFlags<T>::Zero) [with Enum = AbstractMetaAttributes::Attribute; QFlags<T>::Zero = int QFlags<AbstractMetaAttributes::Attribute>::Private::*]' is deprecated: Use default constructor instead [-Wdeprecated-declarations] introduced by qtbase/af2daafde72db02454d24b7d691aa6861525ab99 in 5.15 Change-Id: Ib66697d8fd5c400619f6193e21572dcccdb4534c Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources')
-rw-r--r--sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp4
-rw-r--r--sources/shiboken2/ApiExtractor/abstractmetalang.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp b/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
index 4566ed3bc..de856a214 100644
--- a/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
+++ b/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
@@ -1215,7 +1215,7 @@ AbstractMetaField *AbstractMetaBuilderPrivate::traverseField(const VariableModel
metaField->setType(metaType);
- AbstractMetaAttributes::Attributes attr = nullptr;
+ AbstractMetaAttributes::Attributes attr;
if (field->isStatic())
attr |= AbstractMetaAttributes::Static;
@@ -1323,7 +1323,7 @@ AbstractMetaFunctionList AbstractMetaBuilderPrivate::classFunctionList(const Sco
AbstractMetaClass::Attributes *constructorAttributes,
AbstractMetaClass *currentClass)
{
- *constructorAttributes = nullptr;
+ *constructorAttributes = {};
AbstractMetaFunctionList result;
const FunctionList &scopeFunctionList = scopeItem->functions();
result.reserve(scopeFunctionList.size());
diff --git a/sources/shiboken2/ApiExtractor/abstractmetalang.cpp b/sources/shiboken2/ApiExtractor/abstractmetalang.cpp
index 5ae671d87..161ee423d 100644
--- a/sources/shiboken2/ApiExtractor/abstractmetalang.cpp
+++ b/sources/shiboken2/ApiExtractor/abstractmetalang.cpp
@@ -531,7 +531,7 @@ bool AbstractMetaFunction::operator<(const AbstractMetaFunction &other) const
*/
AbstractMetaFunction::CompareResult AbstractMetaFunction::compareTo(const AbstractMetaFunction *other) const
{
- CompareResult result = nullptr;
+ CompareResult result;
// Enclosing class...
if (ownerClass() == other->ownerClass())