diff options
author | Arne H Juul <arnej27959@users.noreply.github.com> | 2017-12-01 14:36:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-01 14:36:55 +0100 |
commit | 87934e64dfb15e7b4411933ee3eb76d8ba932fd5 (patch) | |
tree | dbda56bbd0d2c132cd0166a0bfac1165e0431b82 | |
parent | f996e2b07c041b41c3ad79fc1602a0d9b655981c (diff) | |
parent | 993f2af52113f8bf58990aaea211aff8eca44429 (diff) |
Merge pull request #4330 from vespa-engine/havardpe/simplify-casting
use static cast instead of dynamic cast
-rw-r--r-- | eval/src/vespa/eval/tensor/default_tensor_engine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/eval/src/vespa/eval/tensor/default_tensor_engine.cpp b/eval/src/vespa/eval/tensor/default_tensor_engine.cpp index 1f413925319..773d2364b7d 100644 --- a/eval/src/vespa/eval/tensor/default_tensor_engine.cpp +++ b/eval/src/vespa/eval/tensor/default_tensor_engine.cpp @@ -321,8 +321,8 @@ size_t vector_size(const ValueType &type, const vespalib::string &dimension) { } void append_vector(double *&pos, const Value &value) { - const DenseTensorView *view = dynamic_cast<const DenseTensorView *>(&value); - if (view) { + if (auto tensor = value.as_tensor()) { + const DenseTensorView *view = static_cast<const DenseTensorView *>(tensor); for (double cell: view->cellsRef()) { *pos++ = cell; } |