diff options
-rw-r--r-- | .clang-tidy | 1 | ||||
-rw-r--r-- | src/gui/rgba.hpp | 2 | ||||
-rw-r--r-- | src/server/internals/Controller.cpp | 4 |
3 files changed, 3 insertions, 4 deletions
diff --git a/.clang-tidy b/.clang-tidy index 3e13f36e..683b7aab 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -68,7 +68,6 @@ Checks: > -modernize-use-trailing-return-type, -modernize-use-using, -performance-no-automatic-move, - -performance-type-promotion-in-math-fn, -performance-unnecessary-value-param, -portability-simd-intrinsics, -readability-avoid-const-params-in-decls, diff --git a/src/gui/rgba.hpp b/src/gui/rgba.hpp index 949a80d7..ffd63f82 100644 --- a/src/gui/rgba.hpp +++ b/src/gui/rgba.hpp @@ -34,7 +34,7 @@ rgba_to_uint(uint8_t r, uint8_t g, uint8_t b, uint8_t a) static inline uint8_t mono_interpolate(uint8_t v1, uint8_t v2, float f) { - return static_cast<int>(rint((v2) * (f) + (v1) * (1 - (f)))); + return static_cast<int>(rintf((v2) * (f) + (v1) * (1 - (f)))); } #define RGBA_R(x) (static_cast<uint32_t>(x) >> 24) diff --git a/src/server/internals/Controller.cpp b/src/server/internals/Controller.cpp index 1a6bb483..a4f7ef43 100644 --- a/src/server/internals/Controller.cpp +++ b/src/server/internals/Controller.cpp @@ -160,8 +160,8 @@ ControllerNode::control(RunContext& context, uint8_t control_num, uint8_t val, F if (min_port_val < 0) { log_offset = fabs(min_port_val); } - const Sample min = log(min_port_val + 1 + log_offset); - const Sample max = log(max_port_val + 1 + log_offset); + const Sample min = logf(min_port_val + 1 + log_offset); + const Sample max = logf(max_port_val + 1 + log_offset); scaled_value = expf(nval * (max - min) + min) - 1 - log_offset; } else { scaled_value = ((nval) * (max_port_val - min_port_val)) + min_port_val; |