Build: warning fixes for VS2015 and <v141.

This commit is contained in:
ocornut 2026-10-15 15:39:58 +02:00
parent 1ff218165d
commit 4c9c888fc5
2 changed files with 3 additions and 3 deletions

View File

@ -2280,7 +2280,7 @@ void ImDrawList::_AddRectTinyRounding(const ImVec2& p_min, const ImVec2& p_max,
const float stem_y = outer_y + corner_offset[corner].y * stem_offset; const float stem_y = outer_y + corner_offset[corner].y * stem_offset;
const float inner_x = outer_x + corner_offset[corner].x * thickness; const float inner_x = outer_x + corner_offset[corner].x * thickness;
const float inner_y = outer_y + corner_offset[corner].y * thickness; const float inner_y = outer_y + corner_offset[corner].y * thickness;
const bool is_rounded = (flags & corner_flags[corner]); const bool is_rounded = (flags & corner_flags[corner]) != 0;
const int arc_idx = (int)_VtxCurrentIdx; const int arc_idx = (int)_VtxCurrentIdx;
if (is_rounded) if (is_rounded)

View File

@ -2700,7 +2700,7 @@ bool ImGui::DragBehavior(ImGuiID id, ImGuiDataType data_type, void* p_v, float v
{ {
// Canceling action reverts to initial value // Canceling action reverts to initial value
size_t data_size = DataTypeGetInfo(data_type)->Size; size_t data_size = DataTypeGetInfo(data_type)->Size;
bool value_changed = memcmp(p_v, &g.ActiveIdValueOnActivation, data_size); bool value_changed = memcmp(p_v, &g.ActiveIdValueOnActivation, data_size) != 0;
memcpy(p_v, &g.ActiveIdValueOnActivation, data_size); memcpy(p_v, &g.ActiveIdValueOnActivation, data_size);
ClearActiveID(); ClearActiveID();
return value_changed; return value_changed;
@ -3322,7 +3322,7 @@ bool ImGui::SliderBehavior(const ImRect& bb, ImGuiID id, ImGuiDataType data_type
{ {
// Canceling action reverts to initial value // Canceling action reverts to initial value
size_t data_size = DataTypeGetInfo(data_type)->Size; size_t data_size = DataTypeGetInfo(data_type)->Size;
bool value_changed = memcmp(p_v, &g.ActiveIdValueOnActivation, data_size); bool value_changed = memcmp(p_v, &g.ActiveIdValueOnActivation, data_size) != 0;
memcpy(p_v, &g.ActiveIdValueOnActivation, data_size); memcpy(p_v, &g.ActiveIdValueOnActivation, data_size);
ClearActiveID(); ClearActiveID();
return value_changed; return value_changed;