summaryrefslogtreecommitdiffhomepage
path: root/proto-iokit-foohid
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2021-12-15 15:29:46 +0100
committerStanislaw Halik <sthalik@misaki.pl>2021-12-16 15:32:03 +0100
commitaa3d6dd09fb2ecf4a5bf91536ca67b4f71b24613 (patch)
tree50d55ab1822ba68733325955ce6be24d82752a87 /proto-iokit-foohid
parent94cdd29400d739fcec664266537ecf3904a8476d (diff)
many: switch from using std::unique_ptr<t>::get() to &*ptr
Diffstat (limited to 'proto-iokit-foohid')
-rw-r--r--proto-iokit-foohid/iokitprotocol.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/proto-iokit-foohid/iokitprotocol.cpp b/proto-iokit-foohid/iokitprotocol.cpp
index abc43a60..77a1e005 100644
--- a/proto-iokit-foohid/iokitprotocol.cpp
+++ b/proto-iokit-foohid/iokitprotocol.cpp
@@ -49,12 +49,12 @@ static uint8_t valueToStick(FooHIDJoystick *stick, double min, double value, dou
void IOKitProtocol::pose(const double *headpose, const double*)
{
- const uint8_t x = valueToStick(joystick.get(), -75., headpose[0], +75.);
- const uint8_t y = valueToStick(joystick.get(), -75., headpose[1], +75.);
- const uint8_t z = valueToStick(joystick.get(), -75., headpose[2], +75.);
- const uint8_t rx = valueToStick(joystick.get(), -180., headpose[3], +180.);
- const uint8_t ry = valueToStick(joystick.get(), -180., headpose[4], +180.);
- const uint8_t rz = valueToStick(joystick.get(), -180., headpose[5], +180.);
+ const uint8_t x = valueToStick(&*joystick, -75., headpose[0], +75.);
+ const uint8_t y = valueToStick(&*joystick, -75., headpose[1], +75.);
+ const uint8_t z = valueToStick(&*joystick, -75., headpose[2], +75.);
+ const uint8_t rx = valueToStick(&*joystick, -180., headpose[3], +180.);
+ const uint8_t ry = valueToStick(&*joystick, -180., headpose[4], +180.);
+ const uint8_t rz = valueToStick(&*joystick, -180., headpose[5], +180.);
joystick->setValue({x, y, z, rx, ry, rz});
}