diff --git a/alib/src/regexp/Alternation.cpp b/alib/src/regexp/Alternation.cpp index 2284faced6c636d5feb64dafb417ad1bf8a6b4fc..0a02374c60af00a9894ae400eb5e0ce1d9a36551 100644 --- a/alib/src/regexp/Alternation.cpp +++ b/alib/src/regexp/Alternation.cpp @@ -55,7 +55,7 @@ RegExpElement* Alternation::clone() const { } bool Alternation::operator<(const RegExpElement& other) const { - return !(other > *this || other == *this); + return other > *this; } bool Alternation::operator==(const RegExpElement& other) const { @@ -63,7 +63,7 @@ bool Alternation::operator==(const RegExpElement& other) const { } bool Alternation::operator>(const RegExpElement& other) const { - return !(other < *this || other == *this); + return other < *this; } diff --git a/alib/src/regexp/Concatenation.cpp b/alib/src/regexp/Concatenation.cpp index 395f02a4d65fad82f6d3b708c7a747fdb43aee7b..623d2102f5ac00d24972109435158edf812c8f09 100644 --- a/alib/src/regexp/Concatenation.cpp +++ b/alib/src/regexp/Concatenation.cpp @@ -55,7 +55,7 @@ RegExpElement* Concatenation::clone() const { } bool Concatenation::operator<(const RegExpElement& other) const { - return !(other > *this || other == *this); + return other > *this; } bool Concatenation::operator==(const RegExpElement& other) const { @@ -63,7 +63,7 @@ bool Concatenation::operator==(const RegExpElement& other) const { } bool Concatenation::operator>(const RegExpElement& other) const { - return !(other < *this || other == *this); + return other < *this; } diff --git a/alib/src/regexp/Iteration.cpp b/alib/src/regexp/Iteration.cpp index 399a3ee371d46cd1596199f751d3c2799def4a46..61e38b6f321985fd4bcee64a755e5335d13167e0 100644 --- a/alib/src/regexp/Iteration.cpp +++ b/alib/src/regexp/Iteration.cpp @@ -66,7 +66,7 @@ RegExpElement* Iteration::clone() const { } bool Iteration::operator<(const RegExpElement& other) const { - return !(other > *this || other == *this); + return other > *this; } bool Iteration::operator==(const RegExpElement& other) const { @@ -74,7 +74,7 @@ bool Iteration::operator==(const RegExpElement& other) const { } bool Iteration::operator>(const RegExpElement& other) const { - return !(other < *this || other == *this); + return other < *this; } bool Iteration::operator<(const Concatenation&) const { diff --git a/alib/src/regexp/RegExpEmpty.cpp b/alib/src/regexp/RegExpEmpty.cpp index 28683e657fe871d8038d2d4857e0aa06f6976c47..f7b5ad4f952c27f20a6cb189a6fbe15a3cc1dc5b 100644 --- a/alib/src/regexp/RegExpEmpty.cpp +++ b/alib/src/regexp/RegExpEmpty.cpp @@ -17,7 +17,7 @@ RegExpElement* RegExpEmpty::clone() const { } bool RegExpEmpty::operator<(const RegExpElement& other) const { - return !(other > *this || other == *this); + return other > *this; } bool RegExpEmpty::operator==(const RegExpElement& other) const { @@ -25,7 +25,7 @@ bool RegExpEmpty::operator==(const RegExpElement& other) const { } bool RegExpEmpty::operator>(const RegExpElement& other) const { - return !(other < *this || other == *this); + return other < *this; } diff --git a/alib/src/regexp/RegExpEpsilon.cpp b/alib/src/regexp/RegExpEpsilon.cpp index 0d7c64f1591e4bb5d412d4724bc3d2c5b4e6a6ce..8909db8053f0c6d319c775af22cf28484a8cab99 100644 --- a/alib/src/regexp/RegExpEpsilon.cpp +++ b/alib/src/regexp/RegExpEpsilon.cpp @@ -17,7 +17,7 @@ RegExpElement* RegExpEpsilon::clone() const { } bool RegExpEpsilon::operator<(const RegExpElement& other) const { - return !(other > *this || other == *this); + return other > *this; } bool RegExpEpsilon::operator==(const RegExpElement& other) const { @@ -25,7 +25,7 @@ bool RegExpEpsilon::operator==(const RegExpElement& other) const { } bool RegExpEpsilon::operator>(const RegExpElement& other) const { - return !(other < *this || other == *this); + return other < *this; } diff --git a/alib/src/regexp/RegExpSymbol.cpp b/alib/src/regexp/RegExpSymbol.cpp index 6c017bba1bc404c7afce72227478abf72b5d023a..75a109e77068175c48d6e0fda168d6899900109f 100644 --- a/alib/src/regexp/RegExpSymbol.cpp +++ b/alib/src/regexp/RegExpSymbol.cpp @@ -22,7 +22,7 @@ RegExpElement* RegExpSymbol::clone() const { } bool RegExpSymbol::operator<(const RegExpElement& other) const { - return !(other > *this || other == *this); + return other > *this; } bool RegExpSymbol::operator==(const RegExpElement& other) const { @@ -30,7 +30,7 @@ bool RegExpSymbol::operator==(const RegExpElement& other) const { } bool RegExpSymbol::operator>(const RegExpElement& other) const { - return !(other < *this || other == *this); + return other < *this; }