From ce6f0515510c7e1a32aff5198dc7b20bfe9aca0e Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Wed, 17 Jul 2013 13:47:16 -0700 Subject: [PATCH] Fix compare() --- modules/beast_crypto/math/beast_UnsignedInteger.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/beast_crypto/math/beast_UnsignedInteger.h b/modules/beast_crypto/math/beast_UnsignedInteger.h index b6676ea63..fc0fa167c 100644 --- a/modules/beast_crypto/math/beast_UnsignedInteger.h +++ b/modules/beast_crypto/math/beast_UnsignedInteger.h @@ -234,28 +234,28 @@ public: */ bool operator< (UnsignedInteger const& other) const noexcept { - return compare (other) == -1; + return compare (other) < 0; } /** Ordered comparison. */ bool operator<= (UnsignedInteger const& other) const noexcept { - return compare (other) != 1; + return compare (other) <= 0; } /** Ordered comparison. */ bool operator> (UnsignedInteger const& other) const noexcept { - return compare (other) == 1; + return compare (other) > 0; } /** Ordered comparison. */ bool operator>= (UnsignedInteger const& other) const noexcept { - return compare (other) != -1; + return compare (other) >= 0; } /** Perform bitwise logical-not.