diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2021-12-15 15:29:46 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2021-12-16 15:32:03 +0100 |
commit | aa3d6dd09fb2ecf4a5bf91536ca67b4f71b24613 (patch) | |
tree | 50d55ab1822ba68733325955ce6be24d82752a87 /dinput | |
parent | 94cdd29400d739fcec664266537ecf3904a8476d (diff) |
many: switch from using std::unique_ptr<t>::get() to &*ptr
Diffstat (limited to 'dinput')
-rw-r--r-- | dinput/keybinding-worker.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dinput/keybinding-worker.cpp b/dinput/keybinding-worker.cpp index 0ceca789..91b02428 100644 --- a/dinput/keybinding-worker.cpp +++ b/dinput/keybinding-worker.cpp @@ -225,7 +225,7 @@ KeybindingWorker::fun* KeybindingWorker::add_receiver(fun& receiver) { QMutexLocker l(&mtx); receivers.push_back(std::make_unique<fun>(receiver)); - fun* f = receivers[receivers.size() - 1].get(); + fun* f = &*receivers[receivers.size() - 1]; //qDebug() << "add receiver" << (long) f; joy_ctx.refresh(); return f; @@ -241,7 +241,7 @@ void KeybindingWorker::remove_receiver(KeybindingWorker::fun* pos) for (int i = s(receivers.size()) - 1; i >= 0; i--) { using u = unsigned; - if (receivers[u(i)].get() == pos) + if (&*receivers[u(i)] == pos) { ok = true; //qDebug() << "remove receiver" << (long) pos; |