summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Wicking <paul.wicking@qt.io>2024-04-11 12:07:31 +0200
committerPaul Wicking <paul.wicking@qt.io>2024-04-17 05:22:56 +0200
commit47777e70b1febcf85077050bb072b17903c37218 (patch)
tree66c548de823a190aeb39bb40639ce2acc58866e1
parent27075dd89d092ffa91312402c5c701888720ed12 (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.cpp5
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();