diff options
-rw-r--r-- | .clang-tidy | 1 | ||||
-rw-r--r-- | src/jalv_gtk.c | 6 | ||||
-rw-r--r-- | src/jalv_qt.cpp | 4 |
3 files changed, 5 insertions, 6 deletions
diff --git a/.clang-tidy b/.clang-tidy index 952940c..6cbee5d 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -40,7 +40,6 @@ Checks: > -modernize-return-braced-init-list, -modernize-use-trailing-return-type, -modernize-use-using, - -performance-type-promotion-in-math-fn, -readability-implicit-bool-conversion, -readability-inconsistent-declaration-parameter-name, -readability-isolate-declaration, diff --git a/src/jalv_gtk.c b/src/jalv_gtk.c index a3d2e74..0f2a028 100644 --- a/src/jalv_gtk.c +++ b/src/jalv_gtk.c @@ -519,10 +519,10 @@ static void set_float_control(const ControlID* control, float value) { if (control->value_type == control->jalv->forge.Int) { - const int32_t ival = lrint(value); + const int32_t ival = lrintf(value); set_control(control, sizeof(ival), control->jalv->forge.Int, &ival); } else if (control->value_type == control->jalv->forge.Long) { - const int64_t lval = lrint(value); + const int64_t lval = lrintf(value); set_control(control, sizeof(lval), control->jalv->forge.Long, &lval); } else if (control->value_type == control->jalv->forge.Float) { set_control(control, sizeof(value), control->jalv->forge.Float, &value); @@ -856,7 +856,7 @@ make_combo(ControlID* record, float value) 0, point->value, 1, point->label, -1); - if (fabs(value - point->value) < FLT_EPSILON) { + if (fabsf(value - point->value) < FLT_EPSILON) { active = i; } } diff --git a/src/jalv_qt.cpp b/src/jalv_qt.cpp index c05391c..b3b5a38 100644 --- a/src/jalv_qt.cpp +++ b/src/jalv_qt.cpp @@ -522,7 +522,7 @@ Control::setValue(float value) step = (std::find(scalePoints.begin(), scalePoints.end(), value) - scalePoints.begin()); } else if (isLogarithmic) { - step = steps * log(value / min) / log(max / min); + step = steps * logf(value / min) / logf(max / min); } else { step = value * steps; } @@ -575,7 +575,7 @@ Control::getValue() } else if (isInteger) { return dial->value(); } else if (isLogarithmic) { - return min * pow(max / min, (float)dial->value() / (steps - 1)); + return min * powf(max / min, (float)dial->value() / (steps - 1)); } else { return (float)dial->value() / steps; } |