summaryrefslogtreecommitdiffhomepage
path: root/options/slider.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'options/slider.cpp')
-rw-r--r--options/slider.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/options/slider.cpp b/options/slider.cpp
index 4f4124c6..56d9ba16 100644
--- a/options/slider.cpp
+++ b/options/slider.cpp
@@ -24,8 +24,21 @@ slider_value::slider_value(double cur, double min, double max) :
cur_ = min_;
}
-slider_value::slider_value(const slider_value& v) : slider_value(v.cur(), v.min(), v.max())
+slider_value& slider_value::operator=(const slider_value& v)
{
+ if (this != &v)
+ {
+ cur_ = v.cur();
+ min_ = v.min();
+ max_ = v.max();
+ }
+
+ return *this;
+}
+
+slider_value::slider_value(const slider_value& v)
+{
+ *this = v;
}
slider_value::slider_value() : slider_value(0, 0, 0)