summaryrefslogtreecommitdiffhomepage
path: root/tracker-hatire/ftnoir_tracker_hat.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-08-27 17:02:20 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-08-27 17:02:20 +0200
commit7294d6845e0d1eea2a4ac3699c17e0c3cb656bf1 (patch)
tree2668463bf0a7b92c2dbc0c427cb466adca0f3eef /tracker-hatire/ftnoir_tracker_hat.cpp
parent95100251a8146a7be956669e12b33dfffb1898ab (diff)
tracker/hatire: appease clang analyzer
Diffstat (limited to 'tracker-hatire/ftnoir_tracker_hat.cpp')
-rw-r--r--tracker-hatire/ftnoir_tracker_hat.cpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/tracker-hatire/ftnoir_tracker_hat.cpp b/tracker-hatire/ftnoir_tracker_hat.cpp
index 3ec89499..d9f0a33b 100644
--- a/tracker-hatire/ftnoir_tracker_hat.cpp
+++ b/tracker-hatire/ftnoir_tracker_hat.cpp
@@ -15,17 +15,11 @@
hatire::hatire()
{
- HAT.Rot[0]=0;
- HAT.Rot[1]=0;
- HAT.Rot[2]=0;
- HAT.Trans[0]=0;
- HAT.Trans[1]=0;
- HAT.Trans[2]=0;
-
- Begin.append((unsigned char) 0xAA);
- Begin.append((unsigned char) 0xAA);
- End.append((unsigned char) 0x55);
- End.append((unsigned char) 0x55);
+
+ Begin.append((unsigned char) 0xAA);
+ Begin.append((unsigned char) 0xAA);
+ End.append((unsigned char) 0x55);
+ End.append((unsigned char) 0x55);
}
hatire::~hatire() = default;
@@ -146,11 +140,8 @@ void hatire::data(double *data)
{ s.EnableRoll, s.InvertRoll, HAT.Rot[s.RollAxis], data[Roll] },
};
- for (unsigned i = 0; i < std::size(spec); i++)
- {
- auto& k = spec[i];
+ for (auto& k : spec)
k.place = (k.sign ? -1 : 1) * (k.enable ? k.input : 0);
- }
}
#include "ftnoir_tracker_hat_dialog.h"