From a4bf070f89a233faca9ec9d5dbc555ddbf99bbb1 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Thu, 22 Sep 2022 10:11:49 +0000 Subject: [PATCH] Fix build break issues - Adds a missing guard of if statement - Removes unused variables Change-Id: Ic5b7e988261a638e842794f6c462af1cf30db30e Signed-off-by: Hwankyu Jhun --- idlc/gen/dart_proxy_gen.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/idlc/gen/dart_proxy_gen.cc b/idlc/gen/dart_proxy_gen.cc index 4dcbb12..89a35bc 100644 --- a/idlc/gen/dart_proxy_gen.cc +++ b/idlc/gen/dart_proxy_gen.cc @@ -119,10 +119,11 @@ std::string DartProxyGen::GenMethodParcelWrite(const Declaration& decl) { { "", "parcel" }, { "", p->GetID() } }); - if (IsDelegateType(type)) - code += ReplaceAll(CB_METHOD_DELEGATE_ADD, { - { "", p->GetID()}, - }); + if (IsDelegateType(type)) { + code += ReplaceAll(CB_METHOD_DELEGATE_ADD, { + { "", p->GetID()}, + }); + } code += NLine(1); } else if (type.ToString() == "list" || type.ToString() == "array") { code += ReplaceAll(CB_LIST_PARCEL_WRITE, { @@ -285,8 +286,6 @@ std::string DartProxyGen::GenDelegateParams(const Declaration& decl) { if (!params.empty()) params += ", "; - auto& param_type = p->GetParameterType(); - auto& type = param_type.GetBaseType(); params += p->GetID(); } -- 2.7.4