diff --git a/3rdparty/dear-imgui/imgui_widgets.cpp b/3rdparty/dear-imgui/imgui_widgets.cpp index 4eeb49936..59c591886 100644 --- a/3rdparty/dear-imgui/imgui_widgets.cpp +++ b/3rdparty/dear-imgui/imgui_widgets.cpp @@ -1880,6 +1880,11 @@ float ImGui::SliderCalcRatioFromValueT(ImGuiDataType data_type, TYPE v, TYPE v_m namespace ImGui { +float RoundScalarWithFormatFloat(const char* format, ImGuiDataType data_type, float v) +{ + return RoundScalarWithFormatT(format, data_type, v); +} + float SliderCalcRatioFromValueFloat(ImGuiDataType data_type, float v, float v_min, float v_max, float power, float linear_zero_pos) { return SliderCalcRatioFromValueT(data_type, v, v_min, v_max, power, linear_zero_pos); diff --git a/3rdparty/dear-imgui/widgets/range_slider.inl b/3rdparty/dear-imgui/widgets/range_slider.inl index 3863ee96f..4d6d263cf 100644 --- a/3rdparty/dear-imgui/widgets/range_slider.inl +++ b/3rdparty/dear-imgui/widgets/range_slider.inl @@ -4,11 +4,7 @@ namespace ImGui { -extern template -IMGUI_API float RoundScalarWithFormatT(const char* format, ImGuiDataType data_type, float v); - -extern template -IMGUI_API float SliderCalcRatioFromValueT(ImGuiDataType data_type, float v, float v_min, float v_max, float power, float linear_zero_pos); +extern float RoundScalarWithFormatFloat(const char* format, ImGuiDataType data_type, float v); extern float SliderCalcRatioFromValueFloat(ImGuiDataType data_type, float v, float v_min, float v_max, float power, float linear_zero_pos); @@ -95,7 +91,7 @@ bool RangeSliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v1, float* v snprintf(fmt, 64, "%%.%df", decimal_precision); // Round past decimal precision - new_value = RoundScalarWithFormatT(fmt, ImGuiDataType_Float, new_value); + new_value = RoundScalarWithFormatFloat(fmt, ImGuiDataType_Float, new_value); if (*v1 != new_value || *v2 != new_value) { if (fabsf(*v1 - new_value) < fabsf(*v2 - new_value))