Quellcode durchsuchen

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

Arash Partow vor 6 Monaten
Ursprung
Commit
63649e0359
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  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); }
 };