diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-03-27 14:05:51 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-03-27 14:05:51 +0000 |
commit | 3112b96dcd66e8aed0587d44288ca8e347cc31a2 (patch) | |
tree | d537c0d2135604a46feb767a7a7e1986f3813dfd /storageapi | |
parent | f1ca88107239ff1ba6bf0f7e142486352ffd90e4 (diff) |
Avoid need to copy/clone FieldUpdate
Diffstat (limited to 'storageapi')
-rw-r--r-- | storageapi/src/tests/mbusprot/storageprotocoltest.cpp | 4 |
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"))); |