Fix a bug about C++ Generator 55/264255/1
authorHwankyu Jhun <h.jhun@samsung.com>
Wed, 15 Sep 2021 05:10:36 +0000 (14:10 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Wed, 15 Sep 2021 05:10:36 +0000 (14:10 +0900)
The return type is decided by the user.

Change-Id: Ia17a44ee0d2df7109229152a8e15391bdd5fb324
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
idlc/gen/cpp_proxy_body_gen.cc

index 0ec6fd47fdd39ad62eb9bbaca75f56a15761b8e5..56b9a32b7809f9c6110375c6847307d85a93ab8a 100644 (file)
@@ -171,7 +171,8 @@ void CppProxyBodyGen::GenInvocation(std::ofstream& stream,
     return;
   }
 
-  stream << Tab(1) << "int ret;" << NLine(1);
+  stream << NLine(1);
+  stream << Tab(1) << ConvertTypeToString(decl.GetType()) << " ret;";
 
   auto parcel_read = [&]() -> std::string {
         std::string code;