mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
Fix false positive /identicalConditionAfterEarlyExit warnings
This commit is contained in:
parent
cd1e13d4d2
commit
05d86f0c3e
@ -161,26 +161,26 @@ void ComponentBoundary::buildFollowSet(GlushkovBuildState &,
|
|||||||
|
|
||||||
bool ComponentBoundary::checkEmbeddedStartAnchor(bool at_start) const {
|
bool ComponentBoundary::checkEmbeddedStartAnchor(bool at_start) const {
|
||||||
if (at_start) {
|
if (at_start) {
|
||||||
return at_start;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_bound == BEGIN_STRING || m_bound == BEGIN_LINE) {
|
if (m_bound == BEGIN_STRING || m_bound == BEGIN_LINE) {
|
||||||
throw ParseError("Embedded start anchors not supported.");
|
throw ParseError("Embedded start anchors not supported.");
|
||||||
}
|
}
|
||||||
|
|
||||||
return at_start;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ComponentBoundary::checkEmbeddedEndAnchor(bool at_end) const {
|
bool ComponentBoundary::checkEmbeddedEndAnchor(bool at_end) const {
|
||||||
if (at_end) {
|
if (at_end) {
|
||||||
return at_end;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_bound != BEGIN_STRING && m_bound != BEGIN_LINE) {
|
if (m_bound != BEGIN_STRING && m_bound != BEGIN_LINE) {
|
||||||
throw ParseError("Embedded end anchors not supported.");
|
throw ParseError("Embedded end anchors not supported.");
|
||||||
}
|
}
|
||||||
|
|
||||||
return at_end;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
Loading…
x
Reference in New Issue
Block a user