diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-06-26 22:53:01 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-06-26 23:05:21 +0200 |
commit | 3dc30f8e91ec3fd81c8e68a845632cd5e6a5a77b (patch) | |
tree | 291c8a89ec3b75d1df3ac02ed0289aa6a752a7a4 /options/slider.cpp | |
parent | ee0dd3b6d5ad2b6083372f4e4f0cb57a45aaaff2 (diff) |
options/slider: add missing `operator!='
Diffstat (limited to 'options/slider.cpp')
-rw-r--r-- | options/slider.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/options/slider.cpp b/options/slider.cpp index d4f809c5..4f4124c6 100644 --- a/options/slider.cpp +++ b/options/slider.cpp @@ -32,16 +32,6 @@ slider_value::slider_value() : slider_value(0, 0, 0) { } -slider_value& slider_value::operator=(const slider_value& v) -{ - cur_ = v.cur_; - - min_ = v.min_; - max_ = v.max_; - - return *this; -} - bool slider_value::operator==(const slider_value& v) const { using std::fabs; @@ -57,6 +47,11 @@ bool slider_value::operator==(const slider_value& v) const #endif } +bool slider_value::operator!=(const slider_value& v) const +{ + return !(*this == v); +} + slider_value slider_value::update_from_slider(int pos, int q_min, int q_max) const { slider_value v(*this); |