summaryrefslogtreecommitdiffstats
path: root/storageapi
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-03-27 14:05:51 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2022-03-27 14:05:51 +0000
commit3112b96dcd66e8aed0587d44288ca8e347cc31a2 (patch)
treed537c0d2135604a46feb767a7a7e1986f3813dfd /storageapi
parentf1ca88107239ff1ba6bf0f7e142486352ffd90e4 (diff)
Avoid need to copy/clone FieldUpdate
Diffstat (limited to 'storageapi')
-rw-r--r--storageapi/src/tests/mbusprot/storageprotocoltest.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/storageapi/src/tests/mbusprot/storageprotocoltest.cpp b/storageapi/src/tests/mbusprot/storageprotocoltest.cpp
index b927c045f51..a510ed832e8 100644
--- a/storageapi/src/tests/mbusprot/storageprotocoltest.cpp
+++ b/storageapi/src/tests/mbusprot/storageprotocoltest.cpp
@@ -246,9 +246,7 @@ 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));
- document::FieldUpdate fieldUpdate(_testDoc->getField("headerval"));
- fieldUpdate.addUpdate(*assignUpdate);
- update->addUpdate(fieldUpdate);
+ update->addUpdate(std::move(document::FieldUpdate(_testDoc->getField("headerval")).addUpdate(*assignUpdate)));
update->addFieldPathUpdate(document::FieldPathUpdate::CP(
new document::RemoveFieldPathUpdate("headerval", "testdoctype1.headerval > 0")));