From 63649e03597cb7e9a19e76f9ef394d510beb4c04 Mon Sep 17 00:00:00 2001 From: Arash Partow Date: Wed, 8 Jan 2025 21:40:59 +1100 Subject: [PATCH] Avoid clang/gcc warnings: -Wnontrivial-memaccess. (#8295) --- backends/imgui_impl_glfw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/imgui_impl_glfw.cpp b/backends/imgui_impl_glfw.cpp index 3cd87cd39..aff34a573 100644 --- a/backends/imgui_impl_glfw.cpp +++ b/backends/imgui_impl_glfw.cpp @@ -1064,7 +1064,7 @@ struct ImGui_ImplGlfw_ViewportData WNDPROC PrevWndProc; #endif - ImGui_ImplGlfw_ViewportData() { memset(this, 0, sizeof(*this)); IgnoreWindowSizeEventFrame = IgnoreWindowPosEventFrame = -1; } + ImGui_ImplGlfw_ViewportData() { memset((void*)this, 0, sizeof(*this)); IgnoreWindowSizeEventFrame = IgnoreWindowPosEventFrame = -1; } ~ImGui_ImplGlfw_ViewportData() { IM_ASSERT(Window == nullptr); } };