From a55bc9a80daacef990e32dce5db13416bed6f051 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EA=B9=80=EC=88=98=EC=A7=84/On-Device=20Lab=28SR=29/Enginee?= =?utf8?q?r/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Wed, 6 Mar 2019 14:20:19 +0900 Subject: [PATCH] [neurun] Remove switch stmt from addOperationEx (#4591) As applied in #4577, This commit removes switch stmt from addOperationEx too. Signed-off-by: sjsujinkim --- runtimes/neurun/src/frontend/wrapper/model.cc | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/runtimes/neurun/src/frontend/wrapper/model.cc b/runtimes/neurun/src/frontend/wrapper/model.cc index 7a916ed..d1a4155 100644 --- a/runtimes/neurun/src/frontend/wrapper/model.cc +++ b/runtimes/neurun/src/frontend/wrapper/model.cc @@ -133,18 +133,8 @@ bool ANeuralNetworksModel::addOperationEx(ANeuralNetworksOperationTypeEx type, u auto &factory = OperationFactory::instance(); OperationFactory::Param param{inputCount, inputs, outputCount, outputs}; - switch (type) - { - case ANEURALNETWORKS_CAST_EX: - { - auto node = factory.create(type, param); - _model->addOperation(std::unique_ptr{node}); - - break; - } - default: - throw std::runtime_error{"Not supported operation"}; - } + auto node = factory.create(type, param); + _model->addOperation(std::unique_ptr{node}); } catch (const std::exception &e) { -- 2.7.4