diff --git a/imgui.cpp b/imgui.cpp index cfc742608..ca758e9aa 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -473,11 +473,6 @@ #include // sqrtf, fabsf, fmodf, powf, cosf, sinf, floorf, ceilf #include // vsnprintf, sscanf, printf #include // new (ptr) -#if defined(_MSC_VER) || defined(__MINGW32__) -#include // alloca -#else -#include // alloca -#endif #if defined(_MSC_VER) && _MSC_VER <= 1500 // MSVC 2008 or earlier #include // intptr_t #else @@ -609,9 +604,9 @@ static bool InputIntN(const char* label, int* v, int components, ImG // Platform dependent default implementations //----------------------------------------------------------------------------- -static const char* GetClipboardTextFn_DefaultImpl(); -static void SetClipboardTextFn_DefaultImpl(const char* text); -static void ImeSetInputScreenPosFn_DefaultImpl(int x, int y); +static const char* GetClipboardTextFn_DefaultImpl(); +static void SetClipboardTextFn_DefaultImpl(const char* text); +static void ImeSetInputScreenPosFn_DefaultImpl(int x, int y); //----------------------------------------------------------------------------- // Context @@ -619,12 +614,12 @@ static void ImeSetInputScreenPosFn_DefaultImpl(int x, int y); // We access everything through this pointer (always assumed to be != NULL) // You can swap the pointer to a different context by calling ImGui::SetInternalState() -static ImGuiState GImDefaultState; -ImGuiState* GImGui = &GImDefaultState; +static ImGuiState GImDefaultState; +ImGuiState* GImGui = &GImDefaultState; // Statically allocated default font atlas. This is merely a maneuver to keep ImFontAtlas definition at the bottom of the .h file (otherwise it'd be inside ImGuiIO) // Also we wouldn't be able to new() one at this point, before users may define IO.MemAllocFn. -static ImFontAtlas GImDefaultFontAtlas; +static ImFontAtlas GImDefaultFontAtlas; //----------------------------------------------------------------------------- // User facing structures diff --git a/imgui_draw.cpp b/imgui_draw.cpp index 415474fa6..d491bcc46 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -19,6 +19,11 @@ #include "imgui_internal.h" #include // vsnprintf, sscanf, printf #include // new (ptr) +#if defined(_MSC_VER) || defined(__MINGW32__) +#include // alloca +#else +#include // alloca +#endif #ifdef _MSC_VER #pragma warning (disable: 4505) // unreferenced local function has been removed (stb stuff)