From 4d75d3393b1e6c16d53d7d2a28001f7e1c6ddc99 Mon Sep 17 00:00:00 2001 From: Paul Wicking Date: Mon, 27 Mar 2023 14:16:39 +0200 Subject: QDoc: Simplify struct FindPredicate::operator() Recent changes removed the enum value SearchType::Module from the FindPredicate struct's member enum. This made the switch in the struct's operator() on `type_` redundant, as the two remaining cases both result in the same behavior. Remove the switch as it isn't needed anymore. Change-Id: Ib2a15de7d4aa9588943a6babb497ec2b970a6290 Reviewed-by: Luca Di Sera --- src/qdoc/clangcodeparser.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/qdoc/clangcodeparser.cpp b/src/qdoc/clangcodeparser.cpp index f4a6e491b..240e0759b 100644 --- a/src/qdoc/clangcodeparser.cpp +++ b/src/qdoc/clangcodeparser.cpp @@ -1381,14 +1381,7 @@ void ClangCodeParser::buildPCH(QString module_header) if (type_ != Any && !p.endsWith(module_)) return false; candidate_ = p + "/"; - switch (type_) { - case Any: - case Module: - candidate_.append(module_); - break; - default: - break; - } + candidate_.append(module_); if (p.startsWith("-I")) candidate_ = candidate_.mid(2); return QFile::exists(QString::fromUtf8(candidate_)); -- cgit v1.2.1