mirror of
https://github.com/monero-project/monero.git
synced 2025-08-20 06:18:20 -04:00
build: fix build with Boost 1.85 and remove instances of viewkey logging [RELEASE]
1. Use std::is_standard_layout and std::is_trivially_copyable instead of std::is_pod for KV byte-wise serialization, which fixes compile issue for Boost UUIDs 2. Removed reimplementation of std::hash for boost::uuids::uuid 3. Removed << operator overload for crypto::secret_key 4. Removed instances in code where private view key was dumped to the log in plaintext Release version of #9450, containing C++14 modified assertions
This commit is contained in:
parent
b089f9ee69
commit
65568d3a88
20 changed files with 80 additions and 69 deletions
|
@ -127,7 +127,7 @@ namespace lmdb
|
|||
/*!
|
||||
A LMDB comparison function that uses `std::memcmp`.
|
||||
|
||||
\toaram T is `!epee::has_padding`
|
||||
\toaram T has standard layout and an alignment of 1
|
||||
\tparam offset to `T` within the value.
|
||||
|
||||
\return The result of `std::memcmp` over the value.
|
||||
|
@ -135,7 +135,7 @@ namespace lmdb
|
|||
template<typename T, std::size_t offset = 0>
|
||||
inline int compare(MDB_val const* left, MDB_val const* right) noexcept
|
||||
{
|
||||
static_assert(!epee::has_padding<T>(), "memcmp will not work");
|
||||
static_assert(std::is_standard_layout<T>() && alignof(T) == 1, "memcmp will not work");
|
||||
if (!left || !right || left->mv_size < sizeof(T) + offset || right->mv_size < sizeof(T) + offset)
|
||||
{
|
||||
assert("invalid use of custom comparison" == 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue