浏览代码

Avoid clang/gcc warnings: -Wnontrivial-memaccess. (#8295)

Arash Partow 8 月之前
父节点
当前提交
63649e0359
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      backends/imgui_impl_glfw.cpp

+ 1 - 1
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); }
 };