From 14221cb0c6912e33560d149fdb6647ed7aea9618 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Wed, 15 Sep 2021 14:10:36 +0900 Subject: [PATCH] Fix a bug about C++ Generator The return type is decided by the user. Change-Id: Ia17a44ee0d2df7109229152a8e15391bdd5fb324 Signed-off-by: Hwankyu Jhun --- idlc/gen/cpp_proxy_body_gen.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/idlc/gen/cpp_proxy_body_gen.cc b/idlc/gen/cpp_proxy_body_gen.cc index 0ec6fd4..56b9a32 100644 --- a/idlc/gen/cpp_proxy_body_gen.cc +++ b/idlc/gen/cpp_proxy_body_gen.cc @@ -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; -- 2.7.4