Remove const keyword from converting functions in NNAPIConvert (#4802)
author장지섭/On-Device Lab(SR)/Engineer/삼성전자 <jiseob.jang@samsung.com>
Thu, 21 Mar 2019 01:06:45 +0000 (10:06 +0900)
committer오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Thu, 21 Mar 2019 01:06:45 +0000 (10:06 +0900)
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 <jiseob.jang@samsung.com>
runtimes/neurun/core/include/util/NNAPIConvert.h
runtimes/neurun/core/src/util/NNAPIConvert.cc

index e863346..ce93413 100644 (file)
@@ -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
index 011e5cb..f1e9e24 100644 (file)
@@ -29,13 +29,13 @@ model::operand::DataType getDataType(OperandCode type)
   return static_cast<model::operand::DataType>(static_cast<uint32_t>(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);