diff options
author | David Robillard <d@drobilla.net> | 2023-05-02 15:32:04 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-05-02 15:32:04 -0400 |
commit | aa01af0cff161c27f357a8ab09510c77f5109ad0 (patch) | |
tree | 77f54b682bcdcacd7732cac54a0d8b56f455d88c | |
parent | 6fadc65e3ce85320f82220c26330b5256765d1fd (diff) | |
download | jalv-aa01af0cff161c27f357a8ab09510c77f5109ad0.tar.gz jalv-aa01af0cff161c27f357a8ab09510c77f5109ad0.tar.bz2 jalv-aa01af0cff161c27f357a8ab09510c77f5109ad0.zip |
Remove old-style casts in C++
-rw-r--r-- | src/jalv_qt.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/jalv_qt.cpp b/src/jalv_qt.cpp index 0f1a2d1..a63a508 100644 --- a/src/jalv_qt.cpp +++ b/src/jalv_qt.cpp @@ -505,10 +505,11 @@ Control::getValue() } if (isLogarithmic) { - return min * powf(max / min, (float)dial->value() / (steps - 1)); + return min * + powf(max / min, static_cast<float>(dial->value()) / (steps - 1)); } - return (float)dial->value() / steps; + return static_cast<float>(dial->value()) / steps; } int @@ -627,13 +628,14 @@ jalv_frontend_discover(Jalv*) float jalv_frontend_refresh_rate(Jalv*) { - return (float)QGuiApplication::primaryScreen()->refreshRate(); + return static_cast<float>(QGuiApplication::primaryScreen()->refreshRate()); } float jalv_frontend_scale_factor(Jalv*) { - return (float)QGuiApplication::primaryScreen()->devicePixelRatio(); + return static_cast<float>( + QGuiApplication::primaryScreen()->devicePixelRatio()); } LilvNode* |