浏览代码

Internals: Move IMGUI_CDECL declaration to imgui_internal.h so everyone can profit.

omar 7 年之前
父节点
当前提交
7033b2043b
共有 2 个文件被更改,包括 7 次插入7 次删除
  1. 0 7
      imgui.cpp
  2. 7 0
      imgui_internal.h

+ 0 - 7
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;

+ 7 - 0
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