diff --git a/alib2data/src/string/CyclicString.cpp b/alib2data/src/string/CyclicString.cpp index c0a2a7c11332bab5d851eb74a90b346d4203a0ae..8442041b5f3fe7a488506bfabadbfc45f28d6b8f 100644 --- a/alib2data/src/string/CyclicString.cpp +++ b/alib2data/src/string/CyclicString.cpp @@ -101,7 +101,7 @@ bool CyclicString::operator<(const LinearString& other) const { } bool CyclicString::operator<(const CyclicString& other) const { - return m_Data < other.m_Data; + return std::tie(m_Data, alphabet) < std::tie(other.m_Data, other.alphabet); } bool CyclicString::operator<(const Epsilon& other) const { diff --git a/alib2data/src/string/Epsilon.cpp b/alib2data/src/string/Epsilon.cpp index 5c27657ada76a39b59bdb72366ef7cbcd05ac2bd..40ddbed801f6b2d7c4cd7f467ab2b8afae026f23 100644 --- a/alib2data/src/string/Epsilon.cpp +++ b/alib2data/src/string/Epsilon.cpp @@ -50,8 +50,8 @@ bool Epsilon::isEmpty() const { return true; } -bool Epsilon::operator<(const Epsilon&) const { - return false; +bool Epsilon::operator<(const Epsilon& other) const { + return alphabet < other.alphabet; } bool Epsilon::operator<(const LinearString& other) const { diff --git a/alib2data/src/string/LinearString.cpp b/alib2data/src/string/LinearString.cpp index 3fa17d1cb0fd58760fa16eb03613275a36ece694..2a4eb3ce4442f1298fd9c08e60d6397f0484081d 100644 --- a/alib2data/src/string/LinearString.cpp +++ b/alib2data/src/string/LinearString.cpp @@ -101,7 +101,7 @@ bool LinearString::isEmpty() const { } bool LinearString::operator<(const LinearString& other) const { - return m_Data < other.m_Data; + return std::tie(m_Data, alphabet) < std::tie(other.m_Data, other.alphabet); } bool LinearString::operator<(const CyclicString& other) const {