summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-12-22 16:50:54 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2017-12-29 13:05:59 +0100
commit65c444d2d5a33c78822590b97279aeb9cd2ef0f7 (patch)
tree046cad9f6769f8d6272b971f303f391fc6bca961 /vespalib
parent7a987cefe8df0f1750dd82fc6ae719f4ccdd3569 (diff)
Ensure methods are inlined.
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/vespa/vespalib/stllike/hash_map.h2
-rw-r--r--vespalib/src/vespa/vespalib/stllike/hash_map.hpp8
2 files changed, 2 insertions, 8 deletions
diff --git a/vespalib/src/vespa/vespalib/stllike/hash_map.h b/vespalib/src/vespa/vespalib/stllike/hash_map.h
index 31185a9ff7c..023594d3018 100644
--- a/vespalib/src/vespa/vespalib/stllike/hash_map.h
+++ b/vespalib/src/vespa/vespalib/stllike/hash_map.h
@@ -35,7 +35,7 @@ public:
size_t capacity() const { return _ht.capacity(); }
size_t size() const { return _ht.size(); }
bool empty() const { return _ht.empty(); }
- insert_result insert(const value_type & value);
+ insert_result insert(const value_type & value) { return _ht.insert(value); }
template <typename InputIt>
void insert(InputIt first, InputIt last);
const V & operator [] (const K & key) const { return _ht.find(key)->second; }
diff --git a/vespalib/src/vespa/vespalib/stllike/hash_map.hpp b/vespalib/src/vespa/vespalib/stllike/hash_map.hpp
index 40ef90826b6..e78d6263fb2 100644
--- a/vespalib/src/vespa/vespalib/stllike/hash_map.hpp
+++ b/vespalib/src/vespa/vespalib/stllike/hash_map.hpp
@@ -17,13 +17,7 @@ hash_map<K, V, H, EQ, M>::hash_map(size_t reserveSize, H hasher, EQ equality) :
{ }
template <typename K, typename V, typename H, typename EQ, typename M>
-hash_map<K, V, H, EQ, M>::~hash_map() { }
-
-template <typename K, typename V, typename H, typename EQ, typename M>
-typename hash_map<K, V, H, EQ, M>::insert_result
-hash_map<K, V, H, EQ, M>::insert(const value_type & value) {
- return _ht.insert(value);
-}
+hash_map<K, V, H, EQ, M>::~hash_map() = default;
template <typename K, typename V, typename H, typename EQ, typename M>
void