generator: generate -Wstrict-prototypes-compatible code

This commit is contained in:
Tudor Brindus
2022-02-20 12:22:55 -05:00
parent bd5a043957
commit 987cf98e9c
2 changed files with 5 additions and 4 deletions

View File

@@ -121,7 +121,8 @@ local function func_header_impl_generate(FP)
else
if def.stname == "" then --ImGui namespace or top level
table.insert(outtab,"CIMGUI_API".." "..def.ret.." "..def.ov_cimguiname..def.args..";"..addcoment.."\n")
local empty = def.args:match("^%(%)") --no args
table.insert(outtab,"CIMGUI_API".." "..def.ret.." "..def.ov_cimguiname..(empty and "(void)" or def.args)..";"..addcoment.."\n")
else
cpp2ffi.prtable(def)
error("class function in implementations")