From 163a0812e6b01db5ea9807b9e0e5671ff2e192a5 Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Thu, 1 Jul 2021 10:44:47 +0000 Subject: GC bad and unused method. --- vespalib/src/vespa/vespalib/data/slime/symbol.h | 6 +++--- vespalib/src/vespa/vespalib/stllike/vector_map.h | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/vespalib/src/vespa/vespalib/data/slime/symbol.h b/vespalib/src/vespa/vespalib/data/slime/symbol.h index 77620f3ff92..020fc8bc827 100644 --- a/vespalib/src/vespa/vespalib/data/slime/symbol.h +++ b/vespalib/src/vespa/vespalib/data/slime/symbol.h @@ -12,13 +12,13 @@ namespace vespalib::slime { class Symbol { private: - static const uint32_t UNDEFINED = (uint32_t)-1; + static constexpr uint32_t UNDEFINED = (uint32_t)-1; uint32_t _value; public: - Symbol() : _value(UNDEFINED) {} - Symbol(uint32_t v) : _value(v) {} + Symbol() noexcept : _value(UNDEFINED) {} + Symbol(uint32_t v) noexcept : _value(v) {} bool undefined() const { return (_value == UNDEFINED); } uint32_t getValue() const { return _value; } bool operator<(const Symbol &rhs) const noexcept { return (_value < rhs._value); } diff --git a/vespalib/src/vespa/vespalib/stllike/vector_map.h b/vespalib/src/vespa/vespalib/stllike/vector_map.h index 2e185fe7dbf..d9c5fd44bea 100644 --- a/vespalib/src/vespa/vespalib/stllike/vector_map.h +++ b/vespalib/src/vespa/vespalib/stllike/vector_map.h @@ -52,7 +52,6 @@ public: size_t capacity() const { return _ht.capacity(); } size_t size() const { return _ht.size(); } bool empty() const { return _ht.empty(); } - V & operator [] (const K & key) const { return find(key)->second; } V & operator [] (const K & key); void erase(const K & key) { return _ht.erase(find(key)); } void erase(iterator it) { return _ht.erase(it); } -- cgit v1.2.3