diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-04-17 13:01:19 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-04-17 13:12:31 +0200 |
commit | 87b473e1648ab793b69d040e77fecf8a2ecee7b1 (patch) | |
tree | f1c70adef1e02ea3966f5410cfc744c96ae2a5fe | |
parent | 8d5b1bdf238cda67a50e489a77de1f4f6996b3b2 (diff) |
shiboken6: Fix minor issues in code generation
Drop white space and use nullptr.
Pick-to: 6.7 6.5
Change-Id: I2a29103ef342b541965fb1ad089fbf48019aaf4f
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
-rw-r--r-- | sources/shiboken6/generator/shiboken/cppgenerator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/shiboken6/generator/shiboken/cppgenerator.cpp b/sources/shiboken6/generator/shiboken/cppgenerator.cpp index 05afde69f..35a9d1842 100644 --- a/sources/shiboken6/generator/shiboken/cppgenerator.cpp +++ b/sources/shiboken6/generator/shiboken/cppgenerator.cpp @@ -5494,7 +5494,7 @@ void CppGenerator::writeClassRegister(TextStream &s, if (metaClass->baseClassNames().size() > 1) s << pyTypeBasesVariable << ',' << '\n'; else - s << "0,\n"; + s << "nullptr,\n"; // 8:wrapperflags QByteArrayList wrapperFlags; @@ -5750,7 +5750,7 @@ void CppGenerator::writeTypeDiscoveryFunction(TextStream &s, if (!polymorphicExpr.isEmpty()) { replacePolymorphicIdPlaceHolders(metaClass, &polymorphicExpr); - s << " if (" << polymorphicExpr << ")\n" << indent + s << "if (" << polymorphicExpr << ")\n" << indent << "return cptr;\n" << outdent; } else if (metaClass->isPolymorphic()) { const auto &ancestors = metaClass->allTypeSystemAncestors(); |