mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-06 06:25:54 +01:00
ImVec2: added a check for cases where a custom IM_VEC2_CLASS_EXTRA macro adds an extra operator= to ImVec2
This commit is contained in:
parent
f5d2b7dd01
commit
c7d17f01cd
@ -59,13 +59,17 @@ Autumn cleanup of stuff marked obsolete more than two years ago:
|
|||||||
- `io.GetClipboardTextFn` --> `platform_io.Platform_GetClipboardTextFn`
|
- `io.GetClipboardTextFn` --> `platform_io.Platform_GetClipboardTextFn`
|
||||||
- `io.SetClipboardTextFn` --> `platform_io.Platform_SetClipboardTextFn`
|
- `io.SetClipboardTextFn` --> `platform_io.Platform_SetClipboardTextFn`
|
||||||
- `io.ClipboardUserData` --> `platform_io.Platform_ClipboardUserData`
|
- `io.ClipboardUserData` --> `platform_io.Platform_ClipboardUserData`
|
||||||
|
- Please also try to get rid of calls to `GetContentRegionMax()`, `GetWindowContentRegionMin()`
|
||||||
Please also try to get rid of calls to `GetContentRegionMax()`, `GetWindowContentRegionMin()`
|
and `GetWindowContentRegionMax()` will may be removed soon-ish: you should not
|
||||||
and `GetWindowContentRegionMax()`: you do NOT need those functions. See #7838.
|
ever need those functions. See #7838.
|
||||||
|
|
||||||
|
|
||||||
Other Changes:
|
Other Changes:
|
||||||
|
|
||||||
|
- ImVec2: added a check for cases where a custom `IM_VEC2_CLASS_EXTRA` macro
|
||||||
|
adds an extra `operator=` to ImVec2. This isn't supported but should not
|
||||||
|
be needed as you should have a constructor to convert from your type to ImVec2.
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
VERSION 1.93.0 (Released 2026-10-14)
|
VERSION 1.93.0 (Released 2026-10-14)
|
||||||
|
|||||||
@ -11208,6 +11208,15 @@ static void ImGui::ErrorCheckNewFrameSanityChecks()
|
|||||||
// #define IM_ASSERT(EXPR) do { if (SomeCode(EXPR)) SomeMoreCode(); } while (0) // Correct!
|
// #define IM_ASSERT(EXPR) do { if (SomeCode(EXPR)) SomeMoreCode(); } while (0) // Correct!
|
||||||
if (true) IM_ASSERT(1); else IM_ASSERT(0);
|
if (true) IM_ASSERT(1); else IM_ASSERT(0);
|
||||||
|
|
||||||
|
// Check user IM_VEC2_CLASS_EXTRA macro
|
||||||
|
// (IF YOU GET A "ambiguous overload" COMPILE ERROR HERE: does your IM_VEC2_CLASS_EXTRA macro contains an operator=?
|
||||||
|
// e.g. ImVec2& operator=(const MyPoint & p) { x = p.x; y = p.y; return *this; }
|
||||||
|
// You should be able to remove it if you have the corresponding constructor:
|
||||||
|
// e.g. IM_NODEBUGSTEP constexpr inline ImVec2(const MyPoint& f) : x(f.x), y(f.y) {}
|
||||||
|
// Allowing you to add this extra operator to ImVec2 would prevent our whole codebase from using v = {x,y} assignment style.
|
||||||
|
// PLEASE GET IN TOUCH IF REMOVING THE operator= IS A PROBLEM TO YOU)
|
||||||
|
ImVec2 v; v = { 1.0f, 2.0f };
|
||||||
|
|
||||||
// Emscripten backends are often imprecise in their submission of DeltaTime. (#6114, #3644)
|
// Emscripten backends are often imprecise in their submission of DeltaTime. (#6114, #3644)
|
||||||
// Ideally the Emscripten app/backend should aim to fix or smooth this value and avoid feeding zero, but we tolerate it.
|
// Ideally the Emscripten app/backend should aim to fix or smooth this value and avoid feeding zero, but we tolerate it.
|
||||||
#ifdef __EMSCRIPTEN__
|
#ifdef __EMSCRIPTEN__
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user