@@ -469,17 +469,17 @@ IM_MSVC_RUNTIME_CHECKS_OFF
469
469
struct ImVec1
470
470
{
471
471
float x;
472
- ImVec1 () { x = 0 .0f ; }
473
- ImVec1 (float _x) { x = _x; }
472
+ constexpr ImVec1 () : x( 0 .0f ) { }
473
+ constexpr ImVec1 (float _x) : x(_x) { }
474
474
};
475
475
476
476
// Helper: ImVec2ih (2D vector, half-size integer, for long-term packed storage)
477
477
struct ImVec2ih
478
478
{
479
479
short x, y;
480
- ImVec2ih () { x = y = 0 ; }
481
- ImVec2ih (short _x, short _y) { x = _x; y = _y; }
482
- explicit ImVec2ih (const ImVec2& rhs) { x = ( short )rhs.x ; y = ( short )rhs.y ; }
480
+ constexpr ImVec2ih () : x( 0 ), y( 0 ) { }
481
+ constexpr ImVec2ih (short _x, short _y) : x(_x), y(_y) { }
482
+ constexpr explicit ImVec2ih (const ImVec2& rhs) : x(( short )rhs.x), y(( short )rhs.y) { }
483
483
};
484
484
485
485
// Helper: ImRect (2D axis aligned bounding-box)
@@ -489,10 +489,10 @@ struct IMGUI_API ImRect
489
489
ImVec2 Min; // Upper-left
490
490
ImVec2 Max; // Lower-right
491
491
492
- ImRect () : Min(0 .0f , 0 .0f ), Max(0 .0f , 0 .0f ) {}
493
- ImRect (const ImVec2& min, const ImVec2& max) : Min(min), Max(max) {}
494
- ImRect (const ImVec4& v) : Min(v.x, v.y), Max(v.z, v.w) {}
495
- ImRect (float x1, float y1, float x2, float y2) : Min(x1, y1), Max(x2, y2) {}
492
+ constexpr ImRect () : Min(0 .0f , 0 .0f ), Max(0 .0f , 0 .0f ) {}
493
+ constexpr ImRect (const ImVec2& min, const ImVec2& max) : Min(min), Max(max) {}
494
+ constexpr ImRect (const ImVec4& v) : Min(v.x, v.y), Max(v.z, v.w) {}
495
+ constexpr ImRect (float x1, float y1, float x2, float y2) : Min(x1, y1), Max(x2, y2) {}
496
496
497
497
ImVec2 GetCenter () const { return ImVec2 ((Min.x + Max.x ) * 0 .5f , (Min.y + Max.y ) * 0 .5f ); }
498
498
ImVec2 GetSize () const { return ImVec2 (Max.x - Min.x , Max.y - Min.y ); }
@@ -1171,7 +1171,7 @@ enum ImGuiInputEventType
1171
1171
ImGuiInputEventType_MouseWheel,
1172
1172
ImGuiInputEventType_MouseButton,
1173
1173
ImGuiInputEventType_Key,
1174
- ImGuiInputEventType_Char ,
1174
+ ImGuiInputEventType_Text ,
1175
1175
ImGuiInputEventType_Focus,
1176
1176
ImGuiInputEventType_COUNT
1177
1177
};
0 commit comments