mirror of
https://github.com/ocornut/imgui.git
synced 2026-03-27 23:37:03 -05:00
Cast this to (void*) in zero-clearing memset calls to fix -Wnontrivial-memcall (#9247, #8295, #8129, #8135)
Clang 20+ warns on memset(this, ...) for non-trivially copyable types via -Wnontrivial-memcall. Should separately investigate -Wnonontrivial-memaccess vs -Wnonontrivial-memcall.
This commit is contained in:
committed by
ocornut
parent
eaa32bb787
commit
fbe973a8d0
@@ -44,7 +44,7 @@ struct ImGui_ImplDX12_InitInfo
|
||||
D3D12_GPU_DESCRIPTOR_HANDLE LegacySingleSrvGpuDescriptor;
|
||||
#endif
|
||||
|
||||
ImGui_ImplDX12_InitInfo() { memset(this, 0, sizeof(*this)); }
|
||||
ImGui_ImplDX12_InitInfo() { memset((void*)this, 0, sizeof(*this)); }
|
||||
};
|
||||
|
||||
// Follow "Getting Started" link and check examples/ folder to learn about using backends!
|
||||
|
||||
Reference in New Issue
Block a user