diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2020-08-07 02:12:50 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-08-07 06:50:10 +0000 |
commit | b0ab164c8cb145b32f6acf9fd0941330a58f30ca (patch) | |
tree | 94cd809f844e650ce1297ad8076077ed0e8e2600 /src/mongo | |
parent | 207d9b74d130d4830f253c5a2f62d034d63fb002 (diff) | |
download | mongo-b0ab164c8cb145b32f6acf9fd0941330a58f30ca.tar.gz |
Revert "SERVER-48305 Audit and remove unnecessary string copies in ephemeralForTest radix tree"
This reverts commit 207d9b74d130d4830f253c5a2f62d034d63fb002.
Diffstat (limited to 'src/mongo')
-rw-r--r-- | src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_radix_store.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_radix_store.h b/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_radix_store.h index d7d388a7fd8..2a20c94ee17 100644 --- a/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_radix_store.h +++ b/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_radix_store.h @@ -191,7 +191,7 @@ public: } // Get path from root to '_current' since it is required to traverse up the tree. - const Key& key = _current->_data->first; + Key key = _current->_data->first; std::vector<Node*> context = RadixStore::_buildContext(key, _root.get()); @@ -394,7 +394,7 @@ public: if (_current == nullptr) return; - const Key& key = _current->_data->first; + Key key = _current->_data->first; std::vector<Node*> context = RadixStore::_buildContext(key, _root.get()); Node* node = context.back(); @@ -547,7 +547,7 @@ public: } std::pair<const_iterator, bool> insert(value_type&& value) { - const Key& key = std::move(value).first; + Key key = value.first; Node* node = _findNode(key); if (node != nullptr || key.size() == 0) @@ -557,7 +557,7 @@ public: } std::pair<const_iterator, bool> update(value_type&& value) { - const Key& key = std::move(value).first; + Key key = value.first; // Ensure that the item to be updated exists. auto item = RadixStore::find(key); @@ -1646,7 +1646,7 @@ private: * equivalent to removing that data from the tree. */ std::pair<const_iterator, bool> _upsertWithCopyOnSharedNodes( - const Key& key, boost::optional<value_type> value) { + Key key, boost::optional<value_type> value) { const uint8_t* charKey = reinterpret_cast<const uint8_t*>(key.data()); @@ -1972,7 +1972,7 @@ private: * * This assumes that the key is present in the tree. */ - static std::vector<Node*> _buildContext(const Key& key, Node* node) { + static std::vector<Node*> _buildContext(Key key, Node* node) { std::vector<Node*> context; context.push_back(node); |