Fix build break issues 53/281853/1
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 22 Sep 2022 10:11:49 +0000 (10:11 +0000)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 22 Sep 2022 10:11:49 +0000 (10:11 +0000)
- Adds a missing guard of if statement
- Removes unused variables

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

index 4dcbb12..89a35bc 100644 (file)
@@ -119,10 +119,11 @@ std::string DartProxyGen::GenMethodParcelWrite(const Declaration& decl) {
             { "<PARCEL>", "parcel" },
             { "<NAME>", p->GetID() }
           });
-    if (IsDelegateType(type))
-      code += ReplaceAll(CB_METHOD_DELEGATE_ADD, {
-        { "<DELEGATE>", p->GetID()},
-      });
+      if (IsDelegateType(type)) {
+        code += ReplaceAll(CB_METHOD_DELEGATE_ADD, {
+            { "<DELEGATE>", 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();
   }