mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Refactor Serializer, SerialIter, SHAMapItem, NodeObject:
* Make LessThan private * Make NodeObject::isSame private * Remove hotTRANSACTION * Remove some Serializer members * Remove unused SHAMapItem::getRaw * Remove unused STLedgerEntry::getOwners * Remove Serializer constructors * Remove unused Serializer members * Remove SerialIter ctor
This commit is contained in:
@@ -62,7 +62,7 @@ template <class T>
|
||||
/*constexpr*/
|
||||
inline
|
||||
void
|
||||
maybe_reverse_bytes(T& t, std::true_type)
|
||||
maybe_reverse_bytes(T& t, std::false_type)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ template <class T>
|
||||
/*constexpr*/
|
||||
inline
|
||||
void
|
||||
maybe_reverse_bytes(T& t, std::false_type)
|
||||
maybe_reverse_bytes(T& t, std::true_type)
|
||||
{
|
||||
reverse_bytes(t);
|
||||
}
|
||||
@@ -82,7 +82,7 @@ void
|
||||
maybe_reverse_bytes(T& t, Hasher&)
|
||||
{
|
||||
maybe_reverse_bytes(t, std::integral_constant<bool,
|
||||
Hasher::endian == endian::native>{});
|
||||
Hasher::endian != endian::native>{});
|
||||
}
|
||||
|
||||
} // detail
|
||||
@@ -140,7 +140,7 @@ struct is_uniquely_represented<std::tuple<T...>>
|
||||
|
||||
template <class T, std::size_t N>
|
||||
struct is_uniquely_represented<T[N]>
|
||||
: public std::integral_constant<bool, is_uniquely_represented<T>::value>
|
||||
: public is_uniquely_represented<T>
|
||||
{
|
||||
};
|
||||
|
||||
@@ -176,7 +176,7 @@ struct is_contiguously_hashable
|
||||
|
||||
template <class T, std::size_t N, class HashAlgorithm>
|
||||
struct is_contiguously_hashable<T[N], HashAlgorithm>
|
||||
: public std::integral_constant<bool, is_uniquely_represented<T>::value &&
|
||||
: public std::integral_constant<bool, is_uniquely_represented<T[N]>::value &&
|
||||
(sizeof(T) == 1 ||
|
||||
HashAlgorithm::endian == endian::native)>
|
||||
{};
|
||||
|
||||
@@ -42,6 +42,8 @@ private:
|
||||
public:
|
||||
using result_type = std::size_t;
|
||||
|
||||
static beast::endian const endian = beast::endian::native;
|
||||
|
||||
siphash() = default;
|
||||
|
||||
explicit
|
||||
|
||||
@@ -43,10 +43,10 @@ private:
|
||||
detail::XXH64_state_t state_;
|
||||
|
||||
public:
|
||||
static beast::endian const endian = beast::endian::native;
|
||||
|
||||
using result_type = std::size_t;
|
||||
|
||||
static beast::endian const endian = beast::endian::native;
|
||||
|
||||
xxhasher() noexcept
|
||||
{
|
||||
detail::XXH64_reset (&state_, 1);
|
||||
|
||||
Reference in New Issue
Block a user