Fixed build.

This commit is contained in:
Branimir Karadžić 2018-09-03 13:13:26 -07:00
parent 350e5d45c3
commit 387e37541d
2 changed files with 7 additions and 6 deletions

View File

@ -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<float, float>(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<float, float>(data_type, v, v_min, v_max, power, linear_zero_pos);

View File

@ -4,11 +4,7 @@
namespace ImGui
{
extern template
IMGUI_API float RoundScalarWithFormatT<float, float>(const char* format, ImGuiDataType data_type, float v);
extern template
IMGUI_API float SliderCalcRatioFromValueT<float, float>(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<float, float>(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))