diff options
Diffstat (limited to 'options/slider.hpp')
-rw-r--r-- | options/slider.hpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/options/slider.hpp b/options/slider.hpp index abf39685..5d21bf0f 100644 --- a/options/slider.hpp +++ b/options/slider.hpp @@ -27,10 +27,7 @@ namespace options template<typename t, typename u, typename v> slider_value(t cur, u min, v max) : - cur_(double(cur)), - min_(double(min)), - max_(double(max)) - {} + slider_value((double)cur, (double)min, (double)max) {} slider_value& operator=(const slider_value& v) = default; slider_value(const slider_value& v) = default; @@ -39,9 +36,9 @@ namespace options bool operator==(const slider_value& v) const; bool operator!=(const slider_value& v) const; constexpr operator double() const { return cur_; } - double cur() const { return cur_; } - double min() const { return min_; } - double max() const { return max_; } + constexpr double cur() const { return cur_; } + constexpr double min() const { return min_; } + constexpr double max() const { return max_; } slider_value update_from_slider(int pos, int q_min, int q_max) const; int to_slider_pos(int q_min, int q_max) const; }; |