diff options
author | Sven Gothel <[email protected]> | 2020-11-04 14:01:32 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-11-04 14:01:32 +0100 |
commit | f6756f9b57f9849a2aa5490339f7842533e15acb (patch) | |
tree | 7889d7636a037388f95802528e702fc25afe589a | |
parent | bf2a78a6540ed8f771b060ec3f275865e8e24c39 (diff) |
Fix uint[192, 256]_t operator==(..): Replace copy & paste erroneous size literal with sizeof(data)
-rw-r--r-- | include/jau/basic_types.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/jau/basic_types.hpp b/include/jau/basic_types.hpp index 92d632b..35ab97c 100644 --- a/include/jau/basic_types.hpp +++ b/include/jau/basic_types.hpp @@ -170,7 +170,7 @@ namespace jau { if( this == &o ) { return true; } - return !std::memcmp(data, o.data, 16); + return !std::memcmp(data, o.data, sizeof(data)); } constexpr bool operator!=(uint128_t const &o) const noexcept { return !(*this == o); } @@ -199,7 +199,7 @@ namespace jau { if( this == &o ) { return true; } - return !std::memcmp(data, o.data, 16); + return !std::memcmp(data, o.data, sizeof(data)); } constexpr bool operator!=(uint192_t const &o) const noexcept { return !(*this == o); } @@ -228,7 +228,7 @@ namespace jau { if( this == &o ) { return true; } - return !std::memcmp(data, o.data, 16); + return !std::memcmp(data, o.data, sizeof(data)); } constexpr bool operator!=(uint256_t const &o) const noexcept { return !(*this == o); } |