diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-10-25 17:55:27 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-10-25 17:55:27 +0200 |
commit | 83867b413c449101bbe14615ff857a7785432ede (patch) | |
tree | 3b7a7fd68da8158a97fd67db9806fa6d984ebf80 /gui/mapping-dialog.cpp | |
parent | 00cceaffca6063b963d0848480acaa99f5fecaad (diff) |
cleanup only
- replace warn_unused_result with [[nodiscard]]
- remove some redundant w_a_r
- replace std::decay with remove_cvref_t
- simplify compat/math.hpp
Diffstat (limited to 'gui/mapping-dialog.cpp')
-rw-r--r-- | gui/mapping-dialog.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gui/mapping-dialog.cpp b/gui/mapping-dialog.cpp index 83a045a0..021489dc 100644 --- a/gui/mapping-dialog.cpp +++ b/gui/mapping-dialog.cpp @@ -131,7 +131,7 @@ void mapping_dialog::load() using c = axis_opts::max_clamp; - auto update_xstep = [idx, &conf, &qfc](int clamp_x) { + auto update_xstep = [&qfc](int clamp_x) { int value; if (clamp_x <= c::r20) @@ -144,7 +144,7 @@ void mapping_dialog::load() qfc.set_x_step(value); }; - auto update_ystep = [idx, &conf, &qfc](int clamp_y) { + auto update_ystep = [&qfc](int clamp_y) { int value; switch (clamp_y) { @@ -159,10 +159,7 @@ void mapping_dialog::load() qfc.set_y_step(value); }; - if (idx >= Yaw) - qfc.set_snap(.5, 1); - else - qfc.set_snap(.5, 1); + qfc.set_snap(.5, 1); connect(&axis.opts.clamp_x_, value_::value_changed<int>(), &qfc, update_xstep); connect(&axis.opts.clamp_y_, value_::value_changed<int>(), &qfc, update_ystep); |