diff --git a/cimgui.h b/cimgui.h index 2724a36..888e0b8 100644 --- a/cimgui.h +++ b/cimgui.h @@ -605,7 +605,6 @@ struct ImGuiTextFilter struct ImGuiTextBuffer { ImVector_char Buf; - char EmptyString[1]; }; struct ImGuiStorage { diff --git a/generator/generator.lua b/generator/generator.lua index 24ceef2..6526cbe 100644 --- a/generator/generator.lua +++ b/generator/generator.lua @@ -411,6 +411,10 @@ local function struct_parser() table.insert(structcdefs,line) return end + if line:match"^%s*static char" then + assert(line:match"EmptyString",line) + return --skip that static chat EmtyString + end --if in_function discard if in_functionst then @@ -434,7 +438,7 @@ local function struct_parser() elseif line:match("public:") then --nothing else - local linea = line:gsub("%S+",{class="struct",mutable="",static=""}) + local linea = line:gsub("%S+",{class="struct",mutable=""}) local template = linea:match("ImVector<(.+)>") if template then local te = template:gsub("%s","_") diff --git a/generator/output/cimgui.h b/generator/output/cimgui.h index 2724a36..888e0b8 100644 --- a/generator/output/cimgui.h +++ b/generator/output/cimgui.h @@ -605,7 +605,6 @@ struct ImGuiTextFilter struct ImGuiTextBuffer { ImVector_char Buf; - char EmptyString[1]; }; struct ImGuiStorage { diff --git a/generator/output/structs_and_enums.json b/generator/output/structs_and_enums.json index 87af69d..74ea327 100644 --- a/generator/output/structs_and_enums.json +++ b/generator/output/structs_and_enums.json @@ -1105,10 +1105,7 @@ "name":"DisplaySize"}], "ImGuiTextBuffer":[{"type":"ImVector_char", "template_type":"char", -"name":"Buf"}, -{"type":"char", -"size":1, -"name":"EmptyString[1]"}], +"name":"Buf"}], "ImGuiStyle":[{"type":"float", "name":"Alpha"}, {"type":"ImVec2", diff --git a/generator/output/structs_and_enums.lua b/generator/output/structs_and_enums.lua index b516de4..4b6f084 100644 --- a/generator/output/structs_and_enums.lua +++ b/generator/output/structs_and_enums.lua @@ -1958,10 +1958,6 @@ defs["structs"]["ImGuiTextBuffer"][1] = {} defs["structs"]["ImGuiTextBuffer"][1]["name"] = "Buf" defs["structs"]["ImGuiTextBuffer"][1]["template_type"] = "char" defs["structs"]["ImGuiTextBuffer"][1]["type"] = "ImVector_char" -defs["structs"]["ImGuiTextBuffer"][2] = {} -defs["structs"]["ImGuiTextBuffer"][2]["name"] = "EmptyString[1]" -defs["structs"]["ImGuiTextBuffer"][2]["size"] = 1 -defs["structs"]["ImGuiTextBuffer"][2]["type"] = "char" defs["structs"]["ImGuiTextFilter"] = {} defs["structs"]["ImGuiTextFilter"][1] = {} defs["structs"]["ImGuiTextFilter"][1]["name"] = "InputBuf[256]"