3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-29 20:05:51 +00:00
This commit is contained in:
Nuno Lopes 2021-05-23 12:01:04 +01:00
parent fd0778c3d0
commit 34e8a2f0f6
2 changed files with 5 additions and 11 deletions

View file

@ -276,16 +276,10 @@ bool operator<(const zstring& lhs, const zstring& rhs) {
for (unsigned i = 0; i < len; ++i) {
unsigned Li = lhs[i];
unsigned Ri = rhs[i];
if (Li < Ri) {
return true;
}
else if (Li > Ri) {
return false;
}
if (Li != Ri)
return Li < Ri;
}
// at this point, all compared characters are equal,
// so decide based on the relative lengths
return lhs.length() < rhs.length();
}