]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
Fix false positive /identicalConditionAfterEarlyExit warnings 271/head
authorKonstantinos Margaritis <konstantinos@vectorcamp.gr>
Sat, 11 May 2024 21:05:45 +0000 (00:05 +0300)
committerKonstantinos Margaritis <konstantinos@vectorcamp.gr>
Sat, 11 May 2024 21:05:45 +0000 (00:05 +0300)
src/parser/ComponentBoundary.cpp

index e8eafc8cbbc871d8dfbefecd6b1d849412c4735b..f116cc1b17b02ab8fb7614b62bd700c32bc96e9a 100644 (file)
@@ -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