avoid ImNewDummy issue #80 for MSVC

This commit is contained in:
sonoro1234
2018-11-13 18:17:59 +01:00
parent 4397288459
commit 8911a5a992
3 changed files with 5 additions and 4 deletions

View File

@@ -588,7 +588,6 @@ typedef struct ImVector_TextRange {int Size;int Capacity;TextRange* Data;} ImVec
typedef struct ImVector_ImVec4 {int Size;int Capacity;ImVec4* Data;} ImVector_ImVec4;
typedef struct ImVector_ImDrawIdx {int Size;int Capacity;ImDrawIdx* Data;} ImVector_ImDrawIdx;
typedef struct ImVector_ImVec2 {int Size;int Capacity;ImVec2* Data;} ImVector_ImVec2;
struct ImNewDummy {};
struct ImGuiOnceUponAFrame
{
int RefFrame;

View File

@@ -1093,7 +1093,10 @@ local function gen_structs_and_enums(cdefs,templates)
local desired_linelen = (linelen==0) and 0 or math.max(math.ceil(linelen/10)*10,40)
local spaces_to_add = 0 --desired_linelen - linelen
local linecom = line..string.rep(" ",spaces_to_add)..comment
-- ImNewDummy drop for MSVC
if line:match"ImNewDummy" then break end
if line:match(namespace_re) then
in_namespace = true
end
@@ -1105,7 +1108,7 @@ local function gen_structs_and_enums(cdefs,templates)
break
end
end
-- ImVector special treatment
if structnames[#structnames] == "ImVector" then
if line:match(struct_closing_re) then

View File

@@ -588,7 +588,6 @@ typedef struct ImVector_TextRange {int Size;int Capacity;TextRange* Data;} ImVec
typedef struct ImVector_ImVec4 {int Size;int Capacity;ImVec4* Data;} ImVector_ImVec4;
typedef struct ImVector_ImDrawIdx {int Size;int Capacity;ImDrawIdx* Data;} ImVector_ImDrawIdx;
typedef struct ImVector_ImVec2 {int Size;int Capacity;ImVec2* Data;} ImVector_ImVec2;
struct ImNewDummy {};
struct ImGuiOnceUponAFrame
{
int RefFrame;