diff options
author | 2018-06-13 06:19:41 -0700 | |
---|---|---|
committer | 2018-06-13 06:22:08 -0700 | |
commit | ce568de33120eb180186c11f0b04e69b3541055d (patch) | |
tree | 2871622a4fbec486a3afbf88f4d13ba65b8e9a3e /tensorflow/contrib/lite/toco/tflite/import.cc | |
parent | 29a74058602dfee73242ff001d2130c4589cbdb3 (diff) |
Remove uses of dynamic_cast, which is generally discouraged by the Google C++
style guide,
https://google.github.io/styleguide/cppguide.html#Run-Time_Type_Information__RTTI_
PiperOrigin-RevId: 200380532
Diffstat (limited to 'tensorflow/contrib/lite/toco/tflite/import.cc')
-rw-r--r-- | tensorflow/contrib/lite/toco/tflite/import.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tensorflow/contrib/lite/toco/tflite/import.cc b/tensorflow/contrib/lite/toco/tflite/import.cc index 1be7cf07a7..cb44a5e6d7 100644 --- a/tensorflow/contrib/lite/toco/tflite/import.cc +++ b/tensorflow/contrib/lite/toco/tflite/import.cc @@ -124,8 +124,9 @@ void ImportOperators( new_op = ops_by_name.at(effective_opname) ->Deserialize(input_op->builtin_options(), input_op->custom_options()); - if (TensorFlowUnsupportedOperator* unsupported_op = - dynamic_cast<TensorFlowUnsupportedOperator*>(new_op.get())) { + if (new_op->type == OperatorType::kTensorFlowUnsupported) { + auto* unsupported_op = + static_cast<TensorFlowUnsupportedOperator*>(new_op.get()); unsupported_op->tensorflow_op = opname; // TODO(b/109932940): Remove this when quantized is removed. // For now, we assume all ops are quantized. |