diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-03-28 06:42:13 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-03-28 10:08:43 +0000 |
commit | 02b5efaa3bbc043e50e2c64b968241f842c3cffc (patch) | |
tree | b9f9ea83f0dd49656791439322d5ba3d3b6be0b9 /storageapi | |
parent | bb59611ce9611986ee97f19d2bb725dc1d160074 (diff) |
Avoid the need for clone by using unique_ptr.
Diffstat (limited to 'storageapi')
-rw-r--r-- | storageapi/src/tests/mbusprot/storageprotocoltest.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/storageapi/src/tests/mbusprot/storageprotocoltest.cpp b/storageapi/src/tests/mbusprot/storageprotocoltest.cpp index a510ed832e8..88e827dcd5f 100644 --- a/storageapi/src/tests/mbusprot/storageprotocoltest.cpp +++ b/storageapi/src/tests/mbusprot/storageprotocoltest.cpp @@ -245,8 +245,7 @@ TEST_P(StorageProtocolTest, response_metadata_is_propagated) { TEST_P(StorageProtocolTest, update) { auto update = std::make_shared<document::DocumentUpdate>( _docMan.getTypeRepo(), *_testDoc->getDataType(), _testDoc->getId()); - auto assignUpdate = std::make_shared<document::AssignValueUpdate>(document::IntFieldValue(17)); - update->addUpdate(std::move(document::FieldUpdate(_testDoc->getField("headerval")).addUpdate(*assignUpdate))); + update->addUpdate(std::move(document::FieldUpdate(_testDoc->getField("headerval")).addUpdate(std::make_unique<document::AssignValueUpdate>(document::IntFieldValue(17))))); update->addFieldPathUpdate(document::FieldPathUpdate::CP( new document::RemoveFieldPathUpdate("headerval", "testdoctype1.headerval > 0"))); |