summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2024-04-26 07:09:42 +0200
committerGitHub <noreply@github.com>2024-04-26 07:09:42 +0200
commitface477e177b1fdd5462a5c961e2d00d43895b97 (patch)
tree2d0d66e94ec49ecd4113009e91b0bd73341a6770 /searchlib
parent8e0492ef4ff8416d12271768c58be79cf7a53914 (diff)
parent5553d03a2ea19017c9547478db70d1704d559f50 (diff)
Merge pull request #31055 from vespa-engine/balder/handle-tensor-not-present
Add final on MutableDenseValueView and use noexcept where applicable.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/features/mutable_dense_value_view.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/searchlib/src/vespa/searchlib/features/mutable_dense_value_view.h b/searchlib/src/vespa/searchlib/features/mutable_dense_value_view.h
index 4794de23b4a..52576841093 100644
--- a/searchlib/src/vespa/searchlib/features/mutable_dense_value_view.h
+++ b/searchlib/src/vespa/searchlib/features/mutable_dense_value_view.h
@@ -12,20 +12,20 @@ using namespace vespalib::eval;
/**
* A dense tensor with a cells reference that can be modified.
*/
-class MutableDenseValueView : public Value {
+class MutableDenseValueView final : public Value {
private:
const ValueType _type;
TypedCells _cells;
public:
- MutableDenseValueView(const ValueType &type_in);
- void setCells(TypedCells cells_in) {
+ explicit MutableDenseValueView(const ValueType &type_in);
+ void setCells(TypedCells cells_in) noexcept {
assert(cells_in.type == _type.cell_type());
_cells = cells_in;
}
- const ValueType &type() const final override { return _type; }
- TypedCells cells() const final override { return _cells; }
- const Index &index() const final override { return TrivialIndex::get(); }
- vespalib::MemoryUsage get_memory_usage() const final override {
+ const ValueType &type() const override { return _type; }
+ TypedCells cells() const override { return _cells; }
+ const Index &index() const override { return TrivialIndex::get(); }
+ vespalib::MemoryUsage get_memory_usage() const override {
return self_memory_usage<MutableDenseValueView>();
}
};