summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-10-14 20:03:02 +0200
committerGitHub <noreply@github.com>2020-10-14 20:03:02 +0200
commit89ae1507eb41fc760fc93e3d341db24babccbe44 (patch)
treebf52be62ad94224ac9af19565da17199bd72cdd0 /searchcore
parent29e5303e5c89ff50b10661a430bfd52d41d09774 (diff)
parent3d89b1eaf56c686a9e795f3a544050173ee503e3 (diff)
Merge pull request #14869 from vespa-engine/arnej/minor-document-cleanup
Arnej/minor document cleanup
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/tests/proton/docsummary/summaryfieldconverter_test.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/docsummary/documentstoreadapter.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/searchcore/src/tests/proton/docsummary/summaryfieldconverter_test.cpp b/searchcore/src/tests/proton/docsummary/summaryfieldconverter_test.cpp
index b295926c64a..5f8f7a63dd0 100644
--- a/searchcore/src/tests/proton/docsummary/summaryfieldconverter_test.cpp
+++ b/searchcore/src/tests/proton/docsummary/summaryfieldconverter_test.cpp
@@ -468,8 +468,8 @@ void Test::checkTensor(const Tensor::UP &tensor, const FieldValue *value) {
ASSERT_TRUE(value);
const TensorFieldValue *s = dynamic_cast<const TensorFieldValue *>(value);
ASSERT_TRUE(s);
- const Tensor::UP &tvalue = s->getAsTensorPtr();
- EXPECT_EQUAL(tensor.get() != nullptr, tvalue.get() != nullptr);
+ auto tvalue = s->getAsTensorPtr();
+ EXPECT_EQUAL(tensor.get() != nullptr, tvalue != nullptr);
if (tensor) {
EXPECT_EQUAL(*tensor, *tvalue);
}
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/documentstoreadapter.cpp b/searchcore/src/vespa/searchcore/proton/docsummary/documentstoreadapter.cpp
index 080aee88f3f..0e6ce5e689b 100644
--- a/searchcore/src/vespa/searchcore/proton/docsummary/documentstoreadapter.cpp
+++ b/searchcore/src/vespa/searchcore/proton/docsummary/documentstoreadapter.cpp
@@ -86,7 +86,7 @@ DocumentStoreAdapter::writeField(const FieldValue &value, ResType type)
vespalib::nbostream serialized;
if (value.getClass().inherits(TensorFieldValue::classId)) {
const auto &tvalue = static_cast<const TensorFieldValue &>(value);
- const std::unique_ptr<Tensor> &tensor = tvalue.getAsTensorPtr();
+ auto tensor = tvalue.getAsTensorPtr();
if (tensor) {
vespalib::tensor::TypedBinaryFormat::serialize(serialized, *tensor);
}