summaryrefslogtreecommitdiffstats
path: root/storage/src/tests/persistence
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 /storage/src/tests/persistence
parent02b5efaa3bbc043e50e2c64b968241f842c3cffc (diff)
Use both lvalue and rvalue specifier to avoid explicit std::move()
Diffstat (limited to 'storage/src/tests/persistence')
-rw-r--r--storage/src/tests/persistence/persistencetestutils.cpp4
-rw-r--r--storage/src/tests/persistence/testandsettest.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/storage/src/tests/persistence/persistencetestutils.cpp b/storage/src/tests/persistence/persistencetestutils.cpp
index dfb245b2a52..3812e7b85c9 100644
--- a/storage/src/tests/persistence/persistencetestutils.cpp
+++ b/storage/src/tests/persistence/persistencetestutils.cpp
@@ -225,7 +225,7 @@ PersistenceTestUtils::createBodyUpdate(const document::DocumentId& docId, const
{
const DocumentType* docType(getTypeRepo()->getDocumentType("testdoctype1"));
auto update = std::make_shared<document::DocumentUpdate>(*getTypeRepo(), *docType, docId);
- update->addUpdate(std::move(document::FieldUpdate(docType->getField("content")).addUpdate(std::make_unique<document::AssignValueUpdate>(updateValue))));
+ update->addUpdate(document::FieldUpdate(docType->getField("content")).addUpdate(std::make_unique<document::AssignValueUpdate>(updateValue)));
return update;
}
@@ -234,7 +234,7 @@ PersistenceTestUtils::createHeaderUpdate(const document::DocumentId& docId, cons
{
const DocumentType* docType(getTypeRepo()->getDocumentType("testdoctype1"));
auto update = std::make_shared<document::DocumentUpdate>(*getTypeRepo(), *docType, docId);
- update->addUpdate(std::move(document::FieldUpdate(docType->getField("headerval")).addUpdate(std::make_unique<document::AssignValueUpdate>(updateValue))));
+ update->addUpdate(document::FieldUpdate(docType->getField("headerval")).addUpdate(std::make_unique<document::AssignValueUpdate>(updateValue)));
return update;
}
diff --git a/storage/src/tests/persistence/testandsettest.cpp b/storage/src/tests/persistence/testandsettest.cpp
index 30a9886cf44..6e5fc491941 100644
--- a/storage/src/tests/persistence/testandsettest.cpp
+++ b/storage/src/tests/persistence/testandsettest.cpp
@@ -159,7 +159,7 @@ std::shared_ptr<api::UpdateCommand>
TestAndSetTest::conditional_update_test(bool createIfMissing, api::Timestamp updateTimestamp)
{
auto docUpdate = std::make_shared<document::DocumentUpdate>(_env->_testDocMan.getTypeRepo(), testDoc->getType(), testDocId);
- docUpdate->addUpdate(std::move(document::FieldUpdate(testDoc->getField("content")).addUpdate(std::make_unique<document::AssignValueUpdate>(NEW_CONTENT))));
+ docUpdate->addUpdate(document::FieldUpdate(testDoc->getField("content")).addUpdate(std::make_unique<document::AssignValueUpdate>(NEW_CONTENT)));
docUpdate->setCreateIfNonExistent(createIfMissing);
auto updateUp = std::make_unique<api::UpdateCommand>(BUCKET, docUpdate, updateTimestamp);