summaryrefslogtreecommitdiffstats
path: root/persistence
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-03-28 06:42:13 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2022-03-28 10:08:43 +0000
commit02b5efaa3bbc043e50e2c64b968241f842c3cffc (patch)
treeb9f9ea83f0dd49656791439322d5ba3d3b6be0b9 /persistence
parentbb59611ce9611986ee97f19d2bb725dc1d160074 (diff)
Avoid the need for clone by using unique_ptr.
Diffstat (limited to 'persistence')
-rw-r--r--persistence/src/vespa/persistence/conformancetest/conformancetest.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/persistence/src/vespa/persistence/conformancetest/conformancetest.cpp b/persistence/src/vespa/persistence/conformancetest/conformancetest.cpp
index 339c72864fa..f46bdaf19f0 100644
--- a/persistence/src/vespa/persistence/conformancetest/conformancetest.cpp
+++ b/persistence/src/vespa/persistence/conformancetest/conformancetest.cpp
@@ -910,9 +910,8 @@ TEST_F(ConformanceTest, testUpdate)
const document::DocumentType *docType(
testDocMan.getTypeRepo().getDocumentType("testdoctype1"));
document::DocumentUpdate::SP update(new DocumentUpdate(testDocMan.getTypeRepo(), *docType, doc1->getId()));
- std::shared_ptr<document::AssignValueUpdate> assignUpdate(new document::AssignValueUpdate(document::IntFieldValue(42)));
document::FieldUpdate fieldUpdate(docType->getField("headerval"));
- fieldUpdate.addUpdate(*assignUpdate);
+ fieldUpdate.addUpdate(std::make_unique<document::AssignValueUpdate>(document::IntFieldValue(42)));
update->addUpdate(std::move(fieldUpdate));
{