mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-05 03:18:50 +02:00
refactor: Remove all operator!= definitions
The compiler can deduce `operator!=` from `operator==`.
This commit is contained in:
@@ -352,11 +352,4 @@ bool operator==(const PoolAllocator<T1, MAX_BLOCK_SIZE_BYTES, ALIGN_BYTES>& a,
|
||||
return a.resource() == b.resource();
|
||||
}
|
||||
|
||||
template <class T1, class T2, std::size_t MAX_BLOCK_SIZE_BYTES, std::size_t ALIGN_BYTES>
|
||||
bool operator!=(const PoolAllocator<T1, MAX_BLOCK_SIZE_BYTES, ALIGN_BYTES>& a,
|
||||
const PoolAllocator<T2, MAX_BLOCK_SIZE_BYTES, ALIGN_BYTES>& b) noexcept
|
||||
{
|
||||
return !(a == b);
|
||||
}
|
||||
|
||||
#endif // BITCOIN_SUPPORT_ALLOCATORS_POOL_H
|
||||
|
||||
@@ -46,11 +46,6 @@ struct secure_allocator {
|
||||
{
|
||||
return true;
|
||||
}
|
||||
template <typename U>
|
||||
friend bool operator!=(const secure_allocator&, const secure_allocator<U>&) noexcept
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
// This is exactly like std::string, but with a custom allocator.
|
||||
|
||||
@@ -38,11 +38,6 @@ struct zero_after_free_allocator {
|
||||
{
|
||||
return true;
|
||||
}
|
||||
template <typename U>
|
||||
friend bool operator!=(const zero_after_free_allocator&, const zero_after_free_allocator<U>&) noexcept
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
/** Byte-vector that clears its contents before deletion. */
|
||||
|
||||
Reference in New Issue
Block a user