summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-06-12 10:22:39 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2023-06-12 10:22:39 +0000
commit454cde9a308a6ad329bfec3973cfd0b403401ec9 (patch)
tree8221d4039da32d11bbb2ee316f8aba3b9d061668 /storage
parent5e2317f4e220c5d176baa3d535217891afa48bc1 (diff)
Remove some unused ordering methods
Diffstat (limited to 'storage')
-rw-r--r--storage/src/vespa/storage/bucketdb/btree_lockable_map.h5
-rw-r--r--storage/src/vespa/storage/bucketdb/btree_lockable_map.hpp46
-rw-r--r--storage/src/vespa/storage/bucketdb/storagebucketinfo.h9
3 files changed, 0 insertions, 60 deletions
diff --git a/storage/src/vespa/storage/bucketdb/btree_lockable_map.h b/storage/src/vespa/storage/bucketdb/btree_lockable_map.h
index b1bb7aa95d6..ba7f8dcb2a5 100644
--- a/storage/src/vespa/storage/bucketdb/btree_lockable_map.h
+++ b/storage/src/vespa/storage/bucketdb/btree_lockable_map.h
@@ -39,11 +39,6 @@ public:
BTreeLockableMap();
~BTreeLockableMap() override;
- bool operator==(const BTreeLockableMap& other) const;
- bool operator!=(const BTreeLockableMap& other) const {
- return ! (*this == other);
- }
- bool operator<(const BTreeLockableMap& other) const;
size_t size() const noexcept override;
size_t getMemoryUsage() const noexcept override;
vespalib::MemoryUsage detailed_memory_usage() const noexcept override;
diff --git a/storage/src/vespa/storage/bucketdb/btree_lockable_map.hpp b/storage/src/vespa/storage/bucketdb/btree_lockable_map.hpp
index 6a37b771c48..b92b3481845 100644
--- a/storage/src/vespa/storage/bucketdb/btree_lockable_map.hpp
+++ b/storage/src/vespa/storage/bucketdb/btree_lockable_map.hpp
@@ -92,52 +92,6 @@ size_t BTreeLockableMap<T>::LockWaiters::insert(const LockId & lid) {
}
template <typename T>
-bool BTreeLockableMap<T>::operator==(const BTreeLockableMap& other) const {
- std::lock_guard guard(_lock);
- std::lock_guard guard2(other._lock);
- if (_impl->size() != other._impl->size()) {
- return false;
- }
- auto lhs = _impl->begin();
- auto rhs = other._impl->begin();
- for (; lhs.valid(); ++lhs, ++rhs) {
- assert(rhs.valid());
- if (lhs.getKey() != rhs.getKey()) {
- return false;
- }
- if (_impl->const_value_ref_from_valid_iterator(lhs)
- != other._impl->const_value_ref_from_valid_iterator(rhs))
- {
- return false;
- }
- }
- return true;
-}
-
-template <typename T>
-bool BTreeLockableMap<T>::operator<(const BTreeLockableMap& other) const {
- std::lock_guard guard(_lock);
- std::lock_guard guard2(other._lock);
- auto lhs = _impl->begin();
- auto rhs = other._impl->begin();
- for (; lhs.valid() && rhs.valid(); ++lhs, ++rhs) {
- if (lhs.getKey() != rhs.getKey()) {
- return (lhs.getKey() < rhs.getKey());
- }
- if (_impl->const_value_ref_from_valid_iterator(lhs)
- != other._impl->const_value_ref_from_valid_iterator(rhs))
- {
- return (_impl->const_value_ref_from_valid_iterator(lhs)
- < other._impl->const_value_ref_from_valid_iterator(rhs));
- }
- }
- if (lhs.valid() == rhs.valid()) {
- return false; // All keys are equal in maps of equal size.
- }
- return rhs.valid(); // Rhs still valid, lhs is not; ergo lhs is "less".
-}
-
-template <typename T>
size_t BTreeLockableMap<T>::size() const noexcept {
std::lock_guard guard(_lock);
return _impl->size();
diff --git a/storage/src/vespa/storage/bucketdb/storagebucketinfo.h b/storage/src/vespa/storage/bucketdb/storagebucketinfo.h
index f0abde636b4..220e1cc037e 100644
--- a/storage/src/vespa/storage/bucketdb/storagebucketinfo.h
+++ b/storage/src/vespa/storage/bucketdb/storagebucketinfo.h
@@ -16,15 +16,6 @@ struct StorageBucketInfo {
const api::BucketInfo& getBucketInfo() const noexcept { return info; }
bool verifyLegal() const noexcept { return true; }
uint32_t getMetaCount() const noexcept { return info.getMetaCount(); }
- bool operator == (const StorageBucketInfo &) const noexcept {
- return true;
- }
- bool operator != (const StorageBucketInfo & rhs) const noexcept {
- return !(*this == rhs);
- }
- bool operator < (const StorageBucketInfo &) const noexcept {
- return false;
- }
};
std::ostream& operator<<(std::ostream& out, const StorageBucketInfo& info);