From 2658bc66b8b68212594c71f7b51199921c3c1df9 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 23 Sep 2017 19:22:18 +0200 Subject: use std::size --- tracker-hatire/ftnoir_tracker_hat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tracker-hatire') diff --git a/tracker-hatire/ftnoir_tracker_hat.cpp b/tracker-hatire/ftnoir_tracker_hat.cpp index ca28ae84..6e1b6586 100644 --- a/tracker-hatire/ftnoir_tracker_hat.cpp +++ b/tracker-hatire/ftnoir_tracker_hat.cpp @@ -144,7 +144,7 @@ void hatire::data(double *data) { s.EnableRoll, s.InvertRoll, HAT.Rot[s.RollAxis], data[Roll] }, }; - for (unsigned i = 0; i < sizeof(spec) / sizeof(*spec); i++) + for (unsigned i = 0; i < std::size(spec); i++) { auto& k = spec[i]; k.place = (k.sign ? -1.f : 1.f) * (k.enable ? k.input : 0.f); -- cgit v1.2.3