diff options
author | Geir Storli <geirst@yahooinc.com> | 2023-03-13 13:55:29 +0000 |
---|---|---|
committer | Geir Storli <geirst@yahooinc.com> | 2023-03-13 13:59:08 +0000 |
commit | 0c657642eff7d85c000464e9edba16ded4845e7d (patch) | |
tree | 3315f420e49dd85739089780388007ce1649672a /searchcore/src/tests/proton/common/cachedselect_test.cpp | |
parent | a40183094fd45dbf320dd57f8d56a5a6fac7f247 (diff) |
Reduce creation of Document instances without DocumentTypeRepo.
Diffstat (limited to 'searchcore/src/tests/proton/common/cachedselect_test.cpp')
-rw-r--r-- | searchcore/src/tests/proton/common/cachedselect_test.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/searchcore/src/tests/proton/common/cachedselect_test.cpp b/searchcore/src/tests/proton/common/cachedselect_test.cpp index 6565ec601e6..93a7e46285e 100644 --- a/searchcore/src/tests/proton/common/cachedselect_test.cpp +++ b/searchcore/src/tests/proton/common/cachedselect_test.cpp @@ -123,7 +123,7 @@ makeDoc(const DocumentTypeRepo &repo, int32_t ab) { const DocumentType *docType = repo.getDocumentType("test"); - Document::UP doc(new Document(*docType, DocumentId(docId))); + auto doc = std::make_unique<Document>(repo, *docType, DocumentId(docId)); if (ia != "null") doc->setValue("ia", StringFieldValue(ia)); if (ib != "null") @@ -348,7 +348,7 @@ TestFixture::testParse(const string &selection, const DocumentType *docType = repo.getDocumentType(docTypeName); ASSERT_TRUE(docType != nullptr); - Document::UP emptyDoc(new Document(*docType, DocumentId())); + auto emptyDoc = std::make_unique<Document>(repo, *docType, DocumentId()); res->set(selection, docTypeName, |