diff options
author | Tor Egge <Tor.Egge@online.no> | 2024-05-19 19:42:30 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2024-05-19 19:42:30 +0200 |
commit | 6e3cc46cf6717b58ab658d1efe6b44df0dbae77a (patch) | |
tree | cd7f59dc1d343646744c6f912522a347f48984d1 /searchcore/src | |
parent | dbd26dbe414187f6f5acbd18785549d9ced2a281 (diff) |
Use pointer to vespalib::eval::Value.
Diffstat (limited to 'searchcore/src')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/common/attribute_updater.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/common/attribute_updater.cpp b/searchcore/src/vespa/searchcore/proton/common/attribute_updater.cpp index 01dcf87db37..24d0a05505b 100644 --- a/searchcore/src/vespa/searchcore/proton/common/attribute_updater.cpp +++ b/searchcore/src/vespa/searchcore/proton/common/attribute_updater.cpp @@ -503,7 +503,7 @@ void AttributeUpdater::updateValue(TensorAttribute &vec, uint32_t lid, const FieldValue &val) { validate_field_value_type(FieldValue::Type::TENSOR, val, "TensorAttribute", "TensorFieldValue"); - const auto &tensor = static_cast<const TensorFieldValue &>(val).getAsTensorPtr(); + const auto tensor = static_cast<const TensorFieldValue &>(val).getAsTensorPtr(); if (tensor) { vec.setTensor(lid, *tensor); } else { @@ -558,7 +558,7 @@ std::unique_ptr<PrepareResult> prepare_set_tensor(TensorAttribute& attr, uint32_t docid, const FieldValue& val) { validate_field_value_type(FieldValue::Type::TENSOR, val, "TensorAttribute", "TensorFieldValue"); - const auto& tensor = static_cast<const TensorFieldValue&>(val).getAsTensorPtr(); + const auto tensor = static_cast<const TensorFieldValue&>(val).getAsTensorPtr(); if (tensor) { return attr.prepare_set_tensor(docid, *tensor); } @@ -569,7 +569,7 @@ void complete_set_tensor(TensorAttribute& attr, uint32_t docid, const FieldValue& val, std::unique_ptr<PrepareResult> prepare_result) { validate_field_value_type(FieldValue::Type::TENSOR, val, "TensorAttribute", "TensorFieldValue"); - const auto& tensor = static_cast<const TensorFieldValue&>(val).getAsTensorPtr(); + const auto tensor = static_cast<const TensorFieldValue&>(val).getAsTensorPtr(); if (tensor) { attr.complete_set_tensor(docid, *tensor, std::move(prepare_result)); } else { |