From d337d03ce1b8c0bcd76eaf6a6defcd717490d78a Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Thu, 31 Oct 2019 16:03:18 +0100 Subject: CppEditor: Simplify bugprone-branch-clone readability-simplify-boolean-expr Change-Id: Id30a155e224370713d23b4b534fb82f5e630f36c Reviewed-by: Christian Stenger --- src/plugins/cppeditor/cppdocumentationcommenthelper.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/plugins/cppeditor/cppdocumentationcommenthelper.cpp') diff --git a/src/plugins/cppeditor/cppdocumentationcommenthelper.cpp b/src/plugins/cppeditor/cppdocumentationcommenthelper.cpp index 65c3dc9769..bb656d1900 100644 --- a/src/plugins/cppeditor/cppdocumentationcommenthelper.cpp +++ b/src/plugins/cppeditor/cppdocumentationcommenthelper.cpp @@ -88,10 +88,7 @@ bool isPreviousLineCppStyleComment(const QTextCursor &cursor) return false; const QString text = actual.text().trimmed(); - if (text.startsWith(QLatin1String("///")) || text.startsWith(QLatin1String("//!"))) - return true; - - return false; + return text.startsWith(QLatin1String("///")) || text.startsWith(QLatin1String("//!")); } /// Check if next line is a CppStyle Doxygen Comment @@ -106,10 +103,7 @@ bool isNextLineCppStyleComment(const QTextCursor &cursor) return false; const QString text = actual.text().trimmed(); - if (text.startsWith(QLatin1String("///")) || text.startsWith(QLatin1String("//!"))) - return true; - - return false; + return text.startsWith(QLatin1String("///")) || text.startsWith(QLatin1String("//!")); } bool isCppStyleContinuation(const QTextCursor& cursor) -- cgit v1.2.1