diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-09-18 10:14:55 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-09-18 10:50:34 +0000 |
commit | 635b7047d21eb7f02525359ab44d82a56a7e4c39 (patch) | |
tree | bb9a07def41f76c282ed11143438b1c465238314 | |
parent | 9bbbf390f8e8e88457763f2201cfe98f94bf1520 (diff) |
shiboken: Use member initialization in typesystem XML parser
Change-Id: I38b9e8a457371f5e364b06fc90821753df4af3e9
Reviewed-by: Christian Tismer <tismer@stackless.com>
-rw-r--r-- | sources/shiboken2/ApiExtractor/typesystem.cpp | 12 | ||||
-rw-r--r-- | sources/shiboken2/ApiExtractor/typesystem_p.h | 12 |
2 files changed, 10 insertions, 14 deletions
diff --git a/sources/shiboken2/ApiExtractor/typesystem.cpp b/sources/shiboken2/ApiExtractor/typesystem.cpp index 1f311b73d..2c73de297 100644 --- a/sources/shiboken2/ApiExtractor/typesystem.cpp +++ b/sources/shiboken2/ApiExtractor/typesystem.cpp @@ -397,14 +397,10 @@ static QString msgUnusedAttributes(const QStringRef &tag, const QXmlStreamAttrib return result; } -Handler::Handler(TypeDatabase* database, bool generate) - : m_database(database), m_generate(generate ? TypeEntry::GenerateAll : TypeEntry::GenerateForSubclass) -{ - m_currentEnum = 0; - m_current = 0; - m_currentDroppedEntry = 0; - m_currentDroppedEntryDepth = 0; - m_ignoreDepth = 0; +Handler::Handler(TypeDatabase *database, bool generate) : + m_database(database), + m_generate(generate ? TypeEntry::GenerateAll : TypeEntry::GenerateForSubclass) +{ } static QString readerFileName(const QXmlStreamReader &reader) diff --git a/sources/shiboken2/ApiExtractor/typesystem_p.h b/sources/shiboken2/ApiExtractor/typesystem_p.h index 4f778c6fa..2bd7cfadd 100644 --- a/sources/shiboken2/ApiExtractor/typesystem_p.h +++ b/sources/shiboken2/ApiExtractor/typesystem_p.h @@ -236,16 +236,16 @@ private: StackElement *element, QXmlStreamAttributes *); TypeDatabase* m_database; - StackElement* m_current; - StackElement* m_currentDroppedEntry; - int m_currentDroppedEntryDepth; - int m_ignoreDepth; + StackElement* m_current = nullptr; + StackElement* m_currentDroppedEntry = nullptr; + int m_currentDroppedEntryDepth = 0; + int m_ignoreDepth = 0; QString m_defaultPackage; QString m_defaultSuperclass; QString m_error; - TypeEntry::CodeGeneration m_generate; + const TypeEntry::CodeGeneration m_generate; - EnumTypeEntry* m_currentEnum; + EnumTypeEntry* m_currentEnum = nullptr; QStack<StackElementContext*> m_contextStack; QString m_currentSignature; |