aboutsummaryrefslogtreecommitdiffstats
path: root/storageapi
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-03-28 10:41:04 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2022-03-28 10:41:04 +0000
commit0ef5980e8551e1684f4c5253ede87dcad887eac1 (patch)
treeab75a3e88c9b76629b3fcc9763c5779eb5a2e1f5 /storageapi
parent02b5efaa3bbc043e50e2c64b968241f842c3cffc (diff)
Use both lvalue and rvalue specifier to avoid explicit std::move()
Diffstat (limited to 'storageapi')
-rw-r--r--storageapi/src/tests/mbusprot/storageprotocoltest.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/storageapi/src/tests/mbusprot/storageprotocoltest.cpp b/storageapi/src/tests/mbusprot/storageprotocoltest.cpp
index 88e827dcd5f..40969455d68 100644
--- a/storageapi/src/tests/mbusprot/storageprotocoltest.cpp
+++ b/storageapi/src/tests/mbusprot/storageprotocoltest.cpp
@@ -34,6 +34,11 @@ using document::Document;
using document::DocumentId;
using document::DocumentType;
using document::DocumentTypeRepo;
+using document::FieldUpdate;
+using document::FieldPathUpdate;
+using document::AssignValueUpdate;
+using document::IntFieldValue;
+using document::RemoveFieldPathUpdate;
using document::test::makeDocumentBucket;
using document::test::makeBucketSpace;
using storage::lib::ClusterState;
@@ -245,10 +250,9 @@ TEST_P(StorageProtocolTest, response_metadata_is_propagated) {
TEST_P(StorageProtocolTest, update) {
auto update = std::make_shared<document::DocumentUpdate>(
_docMan.getTypeRepo(), *_testDoc->getDataType(), _testDoc->getId());
- update->addUpdate(std::move(document::FieldUpdate(_testDoc->getField("headerval")).addUpdate(std::make_unique<document::AssignValueUpdate>(document::IntFieldValue(17)))));
+ update->addUpdate(FieldUpdate(_testDoc->getField("headerval")).addUpdate(std::make_unique<AssignValueUpdate>(IntFieldValue(17))));
- update->addFieldPathUpdate(document::FieldPathUpdate::CP(
- new document::RemoveFieldPathUpdate("headerval", "testdoctype1.headerval > 0")));
+ update->addFieldPathUpdate(FieldPathUpdate::CP(new RemoveFieldPathUpdate("headerval", "testdoctype1.headerval > 0")));
auto cmd = std::make_shared<UpdateCommand>(_bucket, update, 14);
EXPECT_EQ(Timestamp(0), cmd->getOldTimestamp());