diff options
author | Paul Wicking <paul.wicking@qt.io> | 2024-04-11 12:07:31 +0200 |
---|---|---|
committer | Paul Wicking <paul.wicking@qt.io> | 2024-04-17 05:22:56 +0200 |
commit | 47777e70b1febcf85077050bb072b17903c37218 (patch) | |
tree | 66c548de823a190aeb39bb40639ce2acc58866e1 | |
parent | 27075dd89d092ffa91312402c5c701888720ed12 (diff) |
QDoc: Minor code cleanup in DocParser
Substitute C-style cast with static_cast, and apply curly braces to an
else clause that was in violation of Qt's code style.
Change-Id: Ifd5cbb56c91837da4886d60340ed580a984daa9f
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
-rw-r--r-- | src/qdoc/qdoc/src/qdoc/docparser.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qdoc/qdoc/src/qdoc/docparser.cpp b/src/qdoc/qdoc/src/qdoc/docparser.cpp index 6a8fcb75a..c3f1a303f 100644 --- a/src/qdoc/qdoc/src/qdoc/docparser.cpp +++ b/src/qdoc/qdoc/src/qdoc/docparser.cpp @@ -1679,10 +1679,11 @@ void DocParser::startSection(Doc::Sections unit, int cmd) leaveValueList(); if (m_currentSection == Doc::NoSection) { - m_currentSection = (Doc::Sections)(unit); + m_currentSection = static_cast<Doc::Sections>(unit); m_private->constructExtra(); - } else + } else { endSection(unit, cmd); + } appendAtom(Atom(Atom::SectionLeft, QString::number(unit))); m_private->constructExtra(); |