From 83867b413c449101bbe14615ff857a7785432ede Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 25 Oct 2018 17:55:27 +0200 Subject: 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 --- gui/mapping-dialog.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'gui/mapping-dialog.cpp') 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(), &qfc, update_xstep); connect(&axis.opts.clamp_y_, value_::value_changed(), &qfc, update_ystep); -- cgit v1.2.3