From 553364f7d87e71a50ae83af66bc2922028d5e33f Mon Sep 17 00:00:00 2001 From: sonoro1234 Date: Mon, 26 Nov 2018 15:57:19 +0100 Subject: [PATCH] add cimgui.h include guards --- cimgui.cpp | 1 + cimgui.h | 3 +++ generator/cimgui_template.h | 4 +++- generator/generator.lua | 3 ++- generator/output/cimgui.cpp | 1 + generator/output/cimgui.h | 3 +++ 6 files changed, 13 insertions(+), 2 deletions(-) diff --git a/cimgui.cpp b/cimgui.cpp index a0a2bc9..1ddc284 100644 --- a/cimgui.cpp +++ b/cimgui.cpp @@ -1,5 +1,6 @@ //This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui //based on imgui.h file version "1.66" from Dear ImGui https://github.com/ocornut/imgui + #include "./imgui/imgui.h" #include "cimgui.h" diff --git a/cimgui.h b/cimgui.h index 5e28d8d..2724a36 100644 --- a/cimgui.h +++ b/cimgui.h @@ -1,5 +1,7 @@ //This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui //based on imgui.h file version "1.66" from Dear ImGui https://github.com/ocornut/imgui +#ifndef CIMGUI_INCLUDED +#define CIMGUI_INCLUDED #include #include #if defined _WIN32 || defined __CYGWIN__ @@ -1444,6 +1446,7 @@ CIMGUI_API ImVector_ImWchar* ImVector_ImWchar_create(); CIMGUI_API void ImVector_ImWchar_destroy(ImVector_ImWchar* p); CIMGUI_API void ImVector_ImWchar_Init(ImVector_ImWchar* p); CIMGUI_API void ImVector_ImWchar_UnInit(ImVector_ImWchar* p); +#endif //CIMGUI_INCLUDED diff --git a/generator/cimgui_template.h b/generator/cimgui_template.h index 0013ab7..4a4130f 100644 --- a/generator/cimgui_template.h +++ b/generator/cimgui_template.h @@ -1,4 +1,5 @@ - +#ifndef CIMGUI_INCLUDED +#define CIMGUI_INCLUDED #include #include #if defined _WIN32 || defined __CYGWIN__ @@ -85,6 +86,7 @@ CIMGUI_API ImVector_ImWchar* ImVector_ImWchar_create(); CIMGUI_API void ImVector_ImWchar_destroy(ImVector_ImWchar* p); CIMGUI_API void ImVector_ImWchar_Init(ImVector_ImWchar* p); CIMGUI_API void ImVector_ImWchar_UnInit(ImVector_ImWchar* p); +#endif //CIMGUI_INCLUDED diff --git a/generator/generator.lua b/generator/generator.lua index 76dbf7d..24ceef2 100644 --- a/generator/generator.lua +++ b/generator/generator.lua @@ -94,7 +94,8 @@ local cimgui_overloads = { --------------------------header definitions local cimgui_header = [[//This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui -//based on imgui.h file version XXX from Dear ImGui https://github.com/ocornut/imgui]] +//based on imgui.h file version XXX from Dear ImGui https://github.com/ocornut/imgui +]] local gdefines = {} --for FLT_MAX and others -------------------------------------------------------------------------- --helper functions diff --git a/generator/output/cimgui.cpp b/generator/output/cimgui.cpp index a0a2bc9..1ddc284 100644 --- a/generator/output/cimgui.cpp +++ b/generator/output/cimgui.cpp @@ -1,5 +1,6 @@ //This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui //based on imgui.h file version "1.66" from Dear ImGui https://github.com/ocornut/imgui + #include "./imgui/imgui.h" #include "cimgui.h" diff --git a/generator/output/cimgui.h b/generator/output/cimgui.h index 5e28d8d..2724a36 100644 --- a/generator/output/cimgui.h +++ b/generator/output/cimgui.h @@ -1,5 +1,7 @@ //This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui //based on imgui.h file version "1.66" from Dear ImGui https://github.com/ocornut/imgui +#ifndef CIMGUI_INCLUDED +#define CIMGUI_INCLUDED #include #include #if defined _WIN32 || defined __CYGWIN__ @@ -1444,6 +1446,7 @@ CIMGUI_API ImVector_ImWchar* ImVector_ImWchar_create(); CIMGUI_API void ImVector_ImWchar_destroy(ImVector_ImWchar* p); CIMGUI_API void ImVector_ImWchar_Init(ImVector_ImWchar* p); CIMGUI_API void ImVector_ImWchar_UnInit(ImVector_ImWchar* p); +#endif //CIMGUI_INCLUDED