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-s2bot/ftnoir_tracker_s2bot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tracker-s2bot') diff --git a/tracker-s2bot/ftnoir_tracker_s2bot.cpp b/tracker-s2bot/ftnoir_tracker_s2bot.cpp index 88362aa4..6621e605 100644 --- a/tracker-s2bot/ftnoir_tracker_s2bot.cpp +++ b/tracker-s2bot/ftnoir_tracker_s2bot.cpp @@ -73,7 +73,7 @@ void tracker_s2bot::run() { const int axis = order[i]; const int add_idx = add_indices[i]; int add = 0; - if (add_idx >= 0 && add_idx < (int)(sizeof(add_cbx) / sizeof(*add_cbx))) + if (add_idx >= 0 && add_idx < (int)std::size(add_cbx)) add = add_cbx[add_idx]; pose[Yaw + i] = orient[axis] + add; // * r2d if it was radians } -- cgit v1.2.3