diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-10-13 15:05:05 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-10-13 15:09:26 +0200 |
commit | 9a0822c445e56580fb3034224191ec825ea0274a (patch) | |
tree | 9fce6a93bb72a0db6b60015b58272abe0fba68ba /gui/mapping-window.cpp | |
parent | 887dd41c5d67c30bd1e9631920d8fc1c3dd1a3f0 (diff) |
options/tie: change "tie" overloads
Adjust usages.
There are ODR issues with MSVC and it doesn't support
C++17 "static inline constexpr" _variables_. Otherwise,
"signal_fun" could be a variable and not a function.
The usages in accela/ewma2 dialog are more verbose now
but the original API was silly.
Diffstat (limited to 'gui/mapping-window.cpp')
-rw-r--r-- | gui/mapping-window.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gui/mapping-window.cpp b/gui/mapping-window.cpp index 0d2c9fbb..127929fe 100644 --- a/gui/mapping-window.cpp +++ b/gui/mapping-window.cpp @@ -109,14 +109,14 @@ void MapWidget::load() if (altp) { connect(&axis.opts.altp, - static_cast<void(base_value::*)(bool) const>(&base_value::valueChanged), + base_value::signal_fun<bool>(), this, [&](bool f) -> void {qfc.setEnabled(f); qfc.force_redraw();}); qfc.setEnabled(axis.opts.altp); qfc.force_redraw(); } - connect(&axis.opts.clamp, static_cast<void(base_value::*)(int) const>(&base_value::valueChanged), + connect(&axis.opts.clamp, base_value::signal_fun<int>(), &qfc, [i, &conf, &qfc](int value) { conf.set_max_input(value); qfc.reload_spline(); |