diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-12-08 05:34:07 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-12-08 05:34:07 +0100 |
commit | 57d8fa7661c97fb9f02279060694a0073e7cc8b5 (patch) | |
tree | fef806825c73b9da2b0fad458a0c4488e756ff60 /options/tie.hpp | |
parent | 4acd40cd2997b2702d9ab411a0c85d1a92a6189d (diff) |
options: get element with call operator
thread_local is expensive.
Diffstat (limited to 'options/tie.hpp')
-rw-r--r-- | options/tie.hpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/options/tie.hpp b/options/tie.hpp index fcb4d60f..942c6098 100644 --- a/options/tie.hpp +++ b/options/tie.hpp @@ -131,8 +131,8 @@ inline void tie_setting(value<slider_value>& v, QSlider* w) const int q_min = w->minimum(); const int q_max = w->maximum(); - w->setValue(v->to_slider_pos(q_min, q_max)); - v = v->update_from_slider(w->value(), q_min, q_max); + w->setValue(v().to_slider_pos(q_min, q_max)); + v = v().update_from_slider(w->value(), q_min, q_max); } base_value::connect(w, @@ -144,8 +144,8 @@ inline void tie_setting(value<slider_value>& v, QSlider* w) { const int q_min = w->minimum(); const int q_max = w->maximum(); - v = v->update_from_slider(pos, q_min, q_max); - w->setValue(v->to_slider_pos(q_min, q_max)); + v = v().update_from_slider(pos, q_min, q_max); + w->setValue(v().to_slider_pos(q_min, q_max)); }); }, v.DIRECT_CONNTYPE); @@ -155,8 +155,8 @@ inline void tie_setting(value<slider_value>& v, QSlider* w) [=, &v](double) { const int q_min = w->minimum(); const int q_max = w->maximum(); - w->setValue(v->to_slider_pos(q_min, q_max)); - v = v->update_from_slider(w->value(), q_min, q_max); + w->setValue(v().to_slider_pos(q_min, q_max)); + v = v().update_from_slider(w->value(), q_min, q_max); }, v.SAFE_CONNTYPE); } |