This commit is contained in:
Branimir Karadžić 2015-10-05 11:36:14 -07:00
parent cbba6eef18
commit 2ec8cb802b
2 changed files with 2 additions and 2 deletions

View file

@ -17,7 +17,7 @@
#define IMGUI_NEW(type) new (ImGui::MemAlloc(sizeof(type) ) ) type
#define IMGUI_DELETE(type, obj) reinterpret_cast<type*>(obj)->~type(), ImGui::MemFree(obj)
#define IMGUI_DELETE_NULL(type, obj) do { if (NULL != obj) { IMGUI_DELETE(type, obj); obj = NULL; } } while (0)
#define IMGUI_DELETE_NULL(type, obj) for (;;) { if (NULL != obj) { IMGUI_DELETE(type, obj); obj = NULL; } break; }
namespace ImGuiWM
{

View file

@ -128,7 +128,7 @@ public:
protected:
virtual ImGuiWM::PlatformWindow* CreatePlatformWindow(bool _main, ImGuiWM::PlatformWindow* _parent, bool _isDragWindow) BX_OVERRIDE
{
PlatformWindow* window = new PlatformWindow(_main, _isDragWindow);
PlatformWindow* window = new (ImGui::MemAlloc(sizeof(PlatformWindow) ) ) PlatformWindow(_main, _isDragWindow);
window->Init(_parent);
return static_cast<ImGuiWM::PlatformWindow*>(window);
}