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 /proto-iokit-foohid | |
parent | 94cdd29400d739fcec664266537ecf3904a8476d (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.cpp | 12 |
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}); } |