From f128b1de42cf8b2d9b50f57561a205073b9e250d Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 3 Jun 2018 15:48:29 +0200 Subject: switch to structured bindings --- tracker-steamvr/steamvr.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'tracker-steamvr') diff --git a/tracker-steamvr/steamvr.cpp b/tracker-steamvr/steamvr.cpp index 7bb2fb22..52a1c44d 100644 --- a/tracker-steamvr/steamvr.cpp +++ b/tracker-steamvr/steamvr.cpp @@ -34,8 +34,7 @@ template auto with_vr_lock(F&& fun) -> decltype(fun(vr_t(), vr_error_t())) { QMutexLocker l(&device_list::mtx); - vr_error_t e; vr_t v; - std::tie(v, e) = device_list::vr_init(); + auto [v, e] = device_list::vr_init(); return fun(v, e); } @@ -228,8 +227,7 @@ void steamvr::data(double* data) { if (device_index != -1) { - pose_t pose; bool ok; - std::tie(ok, pose) = device_list::get_pose(device_index); + auto [ok, pose] = device_list::get_pose(device_index); if (ok) { constexpr int c = 10; -- cgit v1.2.3