From 8d5efbcc0385a9f27e94bf9b5f2e4ad130d1b7cd Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=9E=A5=EC=A7=80=EC=84=AD/On-Device=20Lab=28SR=29/Enginee?= =?utf8?q?r/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Thu, 21 Mar 2019 10:06:45 +0900 Subject: [PATCH] Remove const keyword from converting functions in NNAPIConvert (#4802) This commit removes const keyword from converting functions in NNAPIConvert. In general, const is used on a return value of RVO because const affect move semantics. Signed-off-by: jiseob.jang --- runtimes/neurun/core/include/util/NNAPIConvert.h | 4 ++-- runtimes/neurun/core/src/util/NNAPIConvert.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/runtimes/neurun/core/include/util/NNAPIConvert.h b/runtimes/neurun/core/include/util/NNAPIConvert.h index e863346..ce93413 100644 --- a/runtimes/neurun/core/include/util/NNAPIConvert.h +++ b/runtimes/neurun/core/include/util/NNAPIConvert.h @@ -47,14 +47,14 @@ model::operand::DataType getDataType(OperandCode type); * @param[in] type NNAPI's operand type * @return neurun's internal operand type info */ -const model::operand::TypeInfo getTypeInfo(const ANeuralNetworksOperandType *type); +model::operand::TypeInfo getTypeInfo(const ANeuralNetworksOperandType *type); /** * @brief Convert operand shape info from NNAPI to internal operand shape * @param[in] type NNAPI's operand type * @return neurun's internal operand shape */ -const model::operand::Shape getShape(const ANeuralNetworksOperandType *type); +model::operand::Shape getShape(const ANeuralNetworksOperandType *type); } // namespace neurun } // namespace util diff --git a/runtimes/neurun/core/src/util/NNAPIConvert.cc b/runtimes/neurun/core/src/util/NNAPIConvert.cc index 011e5cb..f1e9e24 100644 --- a/runtimes/neurun/core/src/util/NNAPIConvert.cc +++ b/runtimes/neurun/core/src/util/NNAPIConvert.cc @@ -29,13 +29,13 @@ model::operand::DataType getDataType(OperandCode type) return static_cast(static_cast(type)); } -const model::operand::TypeInfo getTypeInfo(const ANeuralNetworksOperandType *type) +model::operand::TypeInfo getTypeInfo(const ANeuralNetworksOperandType *type) { return model::operand::TypeInfo(getDataType((OperandCode)(type->type)), type->scale, type->zeroPoint); } -const model::operand::Shape getShape(const ANeuralNetworksOperandType *type) +model::operand::Shape getShape(const ANeuralNetworksOperandType *type) { model::operand::Shape shape(type->dimensionCount); -- 2.7.4