[enco] Emit missing return (#1178)
author박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Fri, 24 Aug 2018 02:40:02 +0000 (11:40 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Fri, 24 Aug 2018 02:40:02 +0000 (11:40 +0900)
Network_input_count and Network_output_count emitted by the current
implementation does not have "return".

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
contrib/enco/core/src/CppCode.cpp

index 266ebf3..0b689e8 100644 (file)
@@ -133,7 +133,7 @@ void CppCode::dump(std::ostream &os) const
   // Emit Network_input_count function
   source.append("unsigned ", name, "_input_count(const ", name, " *net) {");
   source.indent();
-  source.append("net->inputs.size();");
+  source.append("return net->inputs.size();");
   source.unindent();
   source.append("}");
 
@@ -175,7 +175,7 @@ void CppCode::dump(std::ostream &os) const
   // Emit Network_output_count function
   source.append("unsigned ", name, "_output_count(const ", name, " *net) {");
   source.indent();
-  source.append("net->outputs.size();");
+  source.append("return net->outputs.size();");
   source.unindent();
   source.append("}");