From 05d86f0c3ec4866b0256eec466f0f1b2115c94c3 Mon Sep 17 00:00:00 2001 From: Konstantinos Margaritis Date: Sun, 12 May 2024 00:05:45 +0300 Subject: [PATCH] Fix false positive /identicalConditionAfterEarlyExit warnings --- src/parser/ComponentBoundary.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/parser/ComponentBoundary.cpp b/src/parser/ComponentBoundary.cpp index e8eafc8c..f116cc1b 100644 --- a/src/parser/ComponentBoundary.cpp +++ b/src/parser/ComponentBoundary.cpp @@ -161,26 +161,26 @@ void ComponentBoundary::buildFollowSet(GlushkovBuildState &, bool ComponentBoundary::checkEmbeddedStartAnchor(bool at_start) const { if (at_start) { - return at_start; + return true; } if (m_bound == BEGIN_STRING || m_bound == BEGIN_LINE) { throw ParseError("Embedded start anchors not supported."); } - return at_start; + return false; } bool ComponentBoundary::checkEmbeddedEndAnchor(bool at_end) const { if (at_end) { - return at_end; + return true; } if (m_bound != BEGIN_STRING && m_bound != BEGIN_LINE) { throw ParseError("Embedded end anchors not supported."); } - return at_end; + return false; } } // namespace