summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--dinput/win32-joystick.cpp4
-rw-r--r--filter-ewma2/ftnoir_filter_ewma2_dialog.cpp4
-rw-r--r--gui/main-window.cpp28
-rw-r--r--gui/mapping-dialog.cpp2
-rw-r--r--gui/settings.cpp4
-rw-r--r--logic/work.cpp20
6 files changed, 31 insertions, 31 deletions
diff --git a/dinput/win32-joystick.cpp b/dinput/win32-joystick.cpp
index 4adf512d..9127b6a8 100644
--- a/dinput/win32-joystick.cpp
+++ b/dinput/win32-joystick.cpp
@@ -111,7 +111,7 @@ std::vector<win32_joy_ctx::joy_info> win32_joy_ctx::get_joy_info()
for (auto& j : joys)
ret.push_back(joy_info { j.second->name, j.first });
- std::sort(ret.begin(), ret.end(), [&](const joy_info& fst, const joy_info& snd) -> bool { return fst.name < snd.name; });
+ std::sort(ret.begin(), ret.end(), [&](const joy_info& fst, const joy_info& snd) { return fst.name < snd.name; });
return ret;
}
@@ -280,7 +280,7 @@ void win32_joy_ctx::enum_state::refresh()
for (auto it = joys.begin(); it != joys.end(); )
{
- if (std::find_if(all.cbegin(), all.cend(), [&](const QString& guid2) -> bool { return it->second->guid == guid2; }) == all.end())
+ if (std::find_if(all.cbegin(), all.cend(), [&](const QString& guid2) { return it->second->guid == guid2; }) == all.end())
{
it = joys.erase(it);
}
diff --git a/filter-ewma2/ftnoir_filter_ewma2_dialog.cpp b/filter-ewma2/ftnoir_filter_ewma2_dialog.cpp
index 966473cf..dc008c93 100644
--- a/filter-ewma2/ftnoir_filter_ewma2_dialog.cpp
+++ b/filter-ewma2/ftnoir_filter_ewma2_dialog.cpp
@@ -29,10 +29,10 @@ dialog_ewma::dialog_ewma()
[](double x) { return QStringLiteral("%1%").arg(x * 100, 0, 'f', 2);});
connect(ui.minSmooth, &QSlider::valueChanged, this,
- [&](int v) -> void { if (ui.maxSmooth->value() < v) ui.maxSmooth->setValue(v); });
+ [&](int v) { if (ui.maxSmooth->value() < v) ui.maxSmooth->setValue(v); });
connect(ui.maxSmooth, &QSlider::valueChanged, this,
- [&](int v) -> void { if (ui.minSmooth->value() > v) ui.minSmooth->setValue(v); });
+ [&](int v) { if (ui.minSmooth->value() > v) ui.minSmooth->setValue(v); });
}
void dialog_ewma::doOK()
diff --git a/gui/main-window.cpp b/gui/main-window.cpp
index 2aa60a2f..34846131 100644
--- a/gui/main-window.cpp
+++ b/gui/main-window.cpp
@@ -172,19 +172,19 @@ MainWindow::MainWindow() :
}
connect(this, &MainWindow::start_tracker,
- this, [&]() -> void { qDebug() << "start tracker"; start_tracker_(); },
+ this, [&]() { qDebug() << "start tracker"; start_tracker_(); },
Qt::QueuedConnection);
connect(this, &MainWindow::stop_tracker,
- this, [&]() -> void { qDebug() << "stop tracker"; stop_tracker_(); },
+ this, [&]() { qDebug() << "stop tracker"; stop_tracker_(); },
Qt::QueuedConnection);
connect(this, &MainWindow::toggle_tracker,
- this, [&]() -> void { qDebug() << "toggle tracker"; if (work) stop_tracker_(); else start_tracker_(); },
+ this, [&]() { qDebug() << "toggle tracker"; if (work) stop_tracker_(); else start_tracker_(); },
Qt::QueuedConnection);
connect(this, &MainWindow::restart_tracker,
- this, [&]() -> void { qDebug() << "restart tracker"; stop_tracker_(); start_tracker_(); },
+ this, [&]() { qDebug() << "restart tracker"; stop_tracker_(); start_tracker_(); },
Qt::QueuedConnection);
// tray
@@ -270,17 +270,17 @@ void MainWindow::register_shortcuts()
t_keys keys
{
- t_key(s.key_start_tracking1, [&](bool) -> void { start_tracker(); }, true),
- t_key(s.key_start_tracking2, [&](bool) -> void { start_tracker(); }, true),
+ t_key(s.key_start_tracking1, [&](bool) { start_tracker(); }, true),
+ t_key(s.key_start_tracking2, [&](bool) { start_tracker(); }, true),
- t_key(s.key_stop_tracking1, [&](bool) -> void { stop_tracker(); }, true),
- t_key(s.key_stop_tracking2, [&](bool) -> void { stop_tracker(); }, true),
+ t_key(s.key_stop_tracking1, [&](bool) { stop_tracker(); }, true),
+ t_key(s.key_stop_tracking2, [&](bool) { stop_tracker(); }, true),
- t_key(s.key_toggle_tracking1, [&](bool) -> void { toggle_tracker(); }, true),
- t_key(s.key_toggle_tracking2, [&](bool) -> void { toggle_tracker(); }, true),
+ t_key(s.key_toggle_tracking1, [&](bool) { toggle_tracker(); }, true),
+ t_key(s.key_toggle_tracking2, [&](bool) { toggle_tracker(); }, true),
- t_key(s.key_restart_tracking1, [&](bool) -> void { restart_tracker(); }, true),
- t_key(s.key_restart_tracking2, [&](bool) -> void { restart_tracker(); }, true),
+ t_key(s.key_restart_tracking1, [&](bool) { restart_tracker(); }, true),
+ t_key(s.key_restart_tracking2, [&](bool) { restart_tracker(); }, true),
};
global_shortcuts.reload(keys);
@@ -654,7 +654,7 @@ bool MainWindow::mk_dialog(std::shared_ptr<dylib> lib, std::unique_ptr<t>& d)
{
const bool just_created = mk_window_common(d, [&]() -> t* {
if (lib && lib->Dialog)
- return reinterpret_cast<t*>(lib->Dialog());
+ return (t*) lib->Dialog();
return nullptr;
});
@@ -690,7 +690,7 @@ void MainWindow::show_filter_settings()
void MainWindow::show_options_dialog()
{
- if (mk_window(options_widget, [&](bool flag) -> void { set_keys_enabled(!flag); }))
+ if (mk_window(options_widget, [&](bool flag) { set_keys_enabled(!flag); }))
{
connect(options_widget.get(), &OptionsDialog::closing, this, &MainWindow::register_shortcuts);
}
diff --git a/gui/mapping-dialog.cpp b/gui/mapping-dialog.cpp
index 68e61041..fbe274e0 100644
--- a/gui/mapping-dialog.cpp
+++ b/gui/mapping-dialog.cpp
@@ -118,7 +118,7 @@ void MapWidget::load()
connect(&axis.opts.altp,
base_value::value_changed<bool>(),
this,
- [&](bool f) -> void {qfc.setEnabled(f); qfc.force_redraw();});
+ [&](bool f) {qfc.setEnabled(f); qfc.force_redraw();});
qfc.setEnabled(axis.opts.altp);
qfc.force_redraw();
}
diff --git a/gui/settings.cpp b/gui/settings.cpp
index 33d9b5cf..3b14dec7 100644
--- a/gui/settings.cpp
+++ b/gui/settings.cpp
@@ -138,9 +138,9 @@ OptionsDialog::OptionsDialog(std::function<void(bool)> pause_keybindings) :
connect(&val.opt.keycode,
static_cast<void (base_value::*)(const QString&) const>(&base_value::valueChanged),
val.label,
- [=](const QString&) -> void { val.label->setText(kopts_to_string(val.opt)); });
+ [=](const QString&) { val.label->setText(kopts_to_string(val.opt)); });
{
- connect(val.button, &QPushButton::clicked, this, [=]() -> void { bind_key(val.opt, val.label); });
+ connect(val.button, &QPushButton::clicked, this, [=]() { bind_key(val.opt, val.label); });
}
}
}
diff --git a/logic/work.cpp b/logic/work.cpp
index 07691535..a2d06245 100644
--- a/logic/work.cpp
+++ b/logic/work.cpp
@@ -65,20 +65,20 @@ Work::Work(Mappings& m, event_handler& ev, QFrame* frame, std::shared_ptr<dylib
tracker(std::make_shared<pipeline>(m, libs, ev, *logger)),
sc(std::make_shared<Shortcuts>()),
keys {
- key_tuple(s.key_center1, [&](bool) -> void { tracker->center(); }, true),
- key_tuple(s.key_center2, [&](bool) -> void { tracker->center(); }, true),
+ key_tuple(s.key_center1, [&](bool) { tracker->center(); }, true),
+ key_tuple(s.key_center2, [&](bool) { tracker->center(); }, true),
- key_tuple(s.key_toggle1, [&](bool) -> void { tracker->toggle_enabled(); }, true),
- key_tuple(s.key_toggle2, [&](bool) -> void { tracker->toggle_enabled(); }, true),
+ key_tuple(s.key_toggle1, [&](bool) { tracker->toggle_enabled(); }, true),
+ key_tuple(s.key_toggle2, [&](bool) { tracker->toggle_enabled(); }, true),
- key_tuple(s.key_zero1, [&](bool) -> void { tracker->zero(); }, true),
- key_tuple(s.key_zero2, [&](bool) -> void { tracker->zero(); }, true),
+ key_tuple(s.key_zero1, [&](bool) { tracker->zero(); }, true),
+ key_tuple(s.key_zero2, [&](bool) { tracker->zero(); }, true),
- key_tuple(s.key_toggle_press1, [&](bool x) -> void { tracker->set_toggle(!x); }, false),
- key_tuple(s.key_toggle_press2, [&](bool x) -> void { tracker->set_toggle(!x); }, false),
+ key_tuple(s.key_toggle_press1, [&](bool x) { tracker->set_toggle(!x); }, false),
+ key_tuple(s.key_toggle_press2, [&](bool x) { tracker->set_toggle(!x); }, false),
- key_tuple(s.key_zero_press1, [&](bool x) -> void { tracker->set_zero(x); }, false),
- key_tuple(s.key_zero_press2, [&](bool x) -> void { tracker->set_zero(x); }, false),
+ key_tuple(s.key_zero_press1, [&](bool x) { tracker->set_zero(x); }, false),
+ key_tuple(s.key_zero_press2, [&](bool x) { tracker->set_zero(x); }, false),
}
{
if (!is_ok())