From 7033b2043b2ec2f9d9a780ecef17053623ccb507 Mon Sep 17 00:00:00 2001 From: omar Date: Tue, 3 Jul 2018 18:28:46 +0200 Subject: [PATCH] Internals: Move IMGUI_CDECL declaration to imgui_internal.h so everyone can profit. --- imgui.cpp | 7 ------- imgui_internal.h | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index 5a268e5f8..00e274812 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -839,13 +839,6 @@ #endif #endif -// Enforce cdecl calling convention for functions called by the standard library, in case compilation settings changed the default to e.g. __vectorcall -#ifdef _MSC_VER -#define IMGUI_CDECL __cdecl -#else -#define IMGUI_CDECL -#endif - static const ImS32 IM_S32_MIN = 0x80000000; // INT_MIN; static const ImS32 IM_S32_MAX = 0x7FFFFFFF; // INT_MAX; static const ImU32 IM_U32_MIN = 0; diff --git a/imgui_internal.h b/imgui_internal.h index d336b1542..305492c1a 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -98,6 +98,13 @@ extern IMGUI_API ImGuiContext* GImGui; // Current implicit ImGui context pointe #define IM_NEWLINE "\n" #endif +// Enforce cdecl calling convention for functions called by the standard library, in case compilation settings changed the default to e.g. __vectorcall +#ifdef _MSC_VER +#define IMGUI_CDECL __cdecl +#else +#define IMGUI_CDECL +#endif + // Helpers: UTF-8 <> wchar IMGUI_API int ImTextStrToUtf8(char* buf, int buf_size, const ImWchar* in_text, const ImWchar* in_text_end); // return output UTF-8 bytes count IMGUI_API int ImTextCharFromUtf8(unsigned int* out_char, const char* in_text, const char* in_text_end); // return input UTF-8 bytes count