summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
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);
}