aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-11-04 14:01:32 +0100
committerSven Gothel <[email protected]>2020-11-04 14:01:32 +0100
commitf6756f9b57f9849a2aa5490339f7842533e15acb (patch)
tree7889d7636a037388f95802528e702fc25afe589a
parentbf2a78a6540ed8f771b060ec3f275865e8e24c39 (diff)
Fix uint[192, 256]_t operator==(..): Replace copy & paste erroneous size literal with sizeof(data)
-rw-r--r--include/jau/basic_types.hpp6
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); }