diff options
author | Zach Yam <zach.yam@mongodb.com> | 2019-06-13 13:06:39 -0400 |
---|---|---|
committer | Zach Yam <zach.yam@mongodb.com> | 2019-06-13 13:06:39 -0400 |
commit | 0eb5d53338bfcff847ce1b9e34b7344dcaf9ed84 (patch) | |
tree | c067050a455532031d78652b85c59d59e12cff95 /src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_btree_impl.cpp | |
parent | bde7615a648ad9bacef680bc5144dcc8c308f6f4 (diff) | |
download | mongo-0eb5d53338bfcff847ce1b9e34b7344dcaf9ed84.tar.gz |
Revert "Make get(Grouped)SortedDataInterface return a unique pointer"
This reverts commit 90a74a50044d4daff7fa66e050bd76e70a0c7e56.
Diffstat (limited to 'src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_btree_impl.cpp')
-rw-r--r-- | src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_btree_impl.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_btree_impl.cpp b/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_btree_impl.cpp index c82d629a2af..d9fa673dba5 100644 --- a/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_btree_impl.cpp +++ b/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_btree_impl.cpp @@ -521,22 +521,21 @@ private: // IndexCatalogEntry argument taken by non-const pointer for consistency with other Btree // factories. We don't actually modify it. -std::unique_ptr<SortedDataInterface> getEphemeralForTestBtreeImpl( - const Ordering& ordering, - bool isUnique, - const NamespaceString& collectionNamespace, - const std::string& indexName, - const BSONObj& keyPattern, - std::shared_ptr<void>* dataInOut) { +SortedDataInterface* getEphemeralForTestBtreeImpl(const Ordering& ordering, + bool isUnique, + const NamespaceString& collectionNamespace, + const std::string& indexName, + const BSONObj& keyPattern, + std::shared_ptr<void>* dataInOut) { invariant(dataInOut); if (!*dataInOut) { *dataInOut = std::make_shared<IndexSet>(IndexEntryComparison(ordering)); } - return std::make_unique<EphemeralForTestBtreeImpl>(static_cast<IndexSet*>(dataInOut->get()), - isUnique, - collectionNamespace, - indexName, - keyPattern); + return new EphemeralForTestBtreeImpl(static_cast<IndexSet*>(dataInOut->get()), + isUnique, + collectionNamespace, + indexName, + keyPattern); } } // namespace mongo |