Add nullptr to delegate table 36/265136/1
authorHwankyu Jhun <h.jhun@samsung.com>
Tue, 12 Oct 2021 00:52:01 +0000 (09:52 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Tue, 12 Oct 2021 00:52:01 +0000 (09:52 +0900)
If the delegate handlers doesn't exist, tidlc adds the nullptr to
the delegate table.

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

index b986ec3583cc250af0e7d849ff5e67e5d476e9a8..5c3980f2f7888df38e274ff8439d1e607ac23cf7 100644 (file)
@@ -318,6 +318,9 @@ void CProxyBodyGen::GenInterfaceDelegateTable(std::ofstream& stream,
     delegate_handlers += member;
   }
 
+  if (delegate_handlers.empty())
+    delegate_handlers = "nullptr," + NLine(1);
+
   std::string code = ReplaceAll(CB_INTERFACE_DELEGATE_TABLE, "<PREFIX>",
       GetHandlePrefix());
   code = ReplaceAll(code, "<NAME>", iface.GetID());