Fix compare()

This commit is contained in:
Vinnie Falco
2013-07-17 13:47:16 -07:00
parent b7dc115813
commit 586ac0be6f

View File

@@ -234,28 +234,28 @@ public:
*/
bool operator< (UnsignedInteger <Bytes> const& other) const noexcept
{
return compare (other) == -1;
return compare (other) < 0;
}
/** Ordered comparison.
*/
bool operator<= (UnsignedInteger <Bytes> const& other) const noexcept
{
return compare (other) != 1;
return compare (other) <= 0;
}
/** Ordered comparison.
*/
bool operator> (UnsignedInteger <Bytes> const& other) const noexcept
{
return compare (other) == 1;
return compare (other) > 0;
}
/** Ordered comparison.
*/
bool operator>= (UnsignedInteger <Bytes> const& other) const noexcept
{
return compare (other) != -1;
return compare (other) >= 0;
}
/** Perform bitwise logical-not.