Verify ABI compatibility between caller code and compiled version of Dear ImGui. This helps detects some build issues. Called by IMGUI_CHECKVERSION(). Verify that the type sizes are matching between the calling file's compilation unit and imgui.cpp's compilation unit If this triggers you have mismatched headers and compiled code versions. - It could be because of a build issue (using new headers w
| 10788 | // Otherwise it is possible that different compilation units would see different structure layout. |
| 10789 | // If you don't want to modify imconfig.h you can use the IMGUI_USER_CONFIG define to change filename. |
| 10790 | bool ImGui::DebugCheckVersionAndDataLayout(const char* version, size_t sz_io, size_t sz_style, size_t sz_vec2, size_t sz_vec4, size_t sz_vert, size_t sz_idx) |
| 10791 | { |
| 10792 | bool error = false; |
| 10793 | if (strcmp(version, IMGUI_VERSION) != 0) { error = true; IM_ASSERT(strcmp(version, IMGUI_VERSION) == 0 && "Mismatched version string!"); } |
| 10794 | if (sz_io != sizeof(ImGuiIO)) { error = true; IM_ASSERT(sz_io == sizeof(ImGuiIO) && "Mismatched struct layout!"); } |
| 10795 | if (sz_style != sizeof(ImGuiStyle)) { error = true; IM_ASSERT(sz_style == sizeof(ImGuiStyle) && "Mismatched struct layout!"); } |
| 10796 | if (sz_vec2 != sizeof(ImVec2)) { error = true; IM_ASSERT(sz_vec2 == sizeof(ImVec2) && "Mismatched struct layout!"); } |
| 10797 | if (sz_vec4 != sizeof(ImVec4)) { error = true; IM_ASSERT(sz_vec4 == sizeof(ImVec4) && "Mismatched struct layout!"); } |
| 10798 | if (sz_vert != sizeof(ImDrawVert)) { error = true; IM_ASSERT(sz_vert == sizeof(ImDrawVert) && "Mismatched struct layout!"); } |
| 10799 | if (sz_idx != sizeof(ImDrawIdx)) { error = true; IM_ASSERT(sz_idx == sizeof(ImDrawIdx) && "Mismatched struct layout!"); } |
| 10800 | return !error; |
| 10801 | } |
| 10802 | |
| 10803 | // Until 1.89 (August 2022, IMGUI_VERSION_NUM < 18814) it was legal to use SetCursorPos()/SetCursorScreenPos() |
| 10804 | // to extend contents size of our parent container (e.g. window contents size, which is used for auto-resizing |
nothing calls this directly
no outgoing calls
no test coverage detected