Repository: ocornut/imgui (language: rust)

Issue:
IM_ASSERT redefined to SDL_assert makes imgui.cpp not compilable
**Version/Branch of Dear ImGui:**

Version: 1.88 WIP
Branch: docking

**Back-end/Renderer/Compiler/OS**

Back-ends: Custom
Compiler: Clang (VS22 package version)
Operating System: Windows 11

**My Issue/Question:**

https://github.com/ocornut/imgui/blob/docking/imgui.cpp#L15661
This line is making imgui.cpp not compiling when replacing IM_ASSERT macro with SDL_assert macro in imconfig.h due to usage of sizeof on bitfield member in release mode.

In release mode, macro resolves to SDL_disabled_assert which in turn resolves to an expression where condition is passed into sizeof operator. They had some reasonings for having it this way in comments right above. 

Solution to this issue seems to be simple on ImGui side - make that line read `IM_ASSERT(ref_node_for_rect->IsVisible == 1);` instead or similar to make it an explicit condition.




Discussion / hints:

Fix patch:
diff --git a/imgui.cpp b/imgui.cpp
index 92f628d86c73..39d0e4d08ad2 100644
--- a/imgui.cpp
+++ b/imgui.cpp
@@ -15658,7 +15658,7 @@ static void ImGui::DockNodePreviewDockSetup(ImGuiWindow* host_window, ImGuiDockN
     ImGuiDockNode* root_payload_as_host = root_payload->DockNodeAsHost;
     ImGuiDockNode* ref_node_for_rect = (host_node && !host_node->IsVisible) ? DockNodeGetRootNode(host_node) : host_node;
     if (ref_node_for_rect)
-        IM_ASSERT(ref_node_for_rect->IsVisible);
+        IM_ASSERT(ref_node_for_rect->IsVisible == true);
 
     // Filter, figure out where we are allowed to dock
     ImGuiDockNodeFlags src_node_flags = root_payload_as_host ? root_payload_as_host->MergedFlags : root_payload->WindowClass.DockNodeFlagsOverrideSet;


Test patch: