diff --git a/client/xr/fb_body_tracker.cpp b/client/xr/fb_body_tracker.cpp index 2472863f..606e5082 100644 --- a/client/xr/fb_body_tracker.cpp +++ b/client/xr/fb_body_tracker.cpp @@ -67,9 +67,7 @@ void xr::fb_body_tracker::stop() std::optional> xr::fb_body_tracker::locate_spaces(XrTime time, XrSpace reference) { if (!handle) - { return std::nullopt; - } assert(xrLocateBodyJointsFB); @@ -110,24 +108,24 @@ std::optional> xr::pico_body_tracker::locate_spaces(XrTime time, XrSpace reference) { if (!xrLocateBodyJointsBD) - { return std::nullopt; - } XrBodyJointsLocateInfoBD locate_info{ .type = XR_TYPE_BODY_JOINTS_LOCATE_INFO_BD, @@ -67,22 +65,22 @@ std::optional poses{}; for (int i = 0; i < joint_whitelist.size(); i++) { - auto & joint_location = joints[joint_whitelist[i]]; + const auto & joint_loc = joints[joint_whitelist[i]]; wivrn::from_headset::body_tracking::pose pose{ - .pose = joint_location.pose, + .pose = joint_loc.pose, .flags = 0, }; - if (joint_location.locationFlags & XR_SPACE_LOCATION_ORIENTATION_VALID_BIT) + if (joint_loc.locationFlags & XR_SPACE_LOCATION_ORIENTATION_VALID_BIT) pose.flags |= wivrn::from_headset::body_tracking::orientation_valid; - if (joint_location.locationFlags & XR_SPACE_LOCATION_POSITION_VALID_BIT) + if (joint_loc.locationFlags & XR_SPACE_LOCATION_POSITION_VALID_BIT) pose.flags |= wivrn::from_headset::body_tracking::position_valid; - if (joint_location.locationFlags & XR_SPACE_LOCATION_ORIENTATION_TRACKED_BIT) + if (joint_loc.locationFlags & XR_SPACE_LOCATION_ORIENTATION_TRACKED_BIT) pose.flags |= wivrn::from_headset::body_tracking::orientation_tracked; - if (joint_location.locationFlags & XR_SPACE_LOCATION_POSITION_TRACKED_BIT) + if (joint_loc.locationFlags & XR_SPACE_LOCATION_POSITION_TRACKED_BIT) pose.flags |= wivrn::from_headset::body_tracking::position_tracked; - poses[i] = std::move(pose); + poses[i] = pose; } return poses; } diff --git a/client/xr/pico_body_tracker.h b/client/xr/pico_body_tracker.h index 96c1944f..3cb0dfbf 100644 --- a/client/xr/pico_body_tracker.h +++ b/client/xr/pico_body_tracker.h @@ -28,7 +28,6 @@ namespace xr { class instance; -class session; XrResult destroy_pico_body_tracker(XrBodyTrackerBD);