From ab2dea5b863a7252255dbfd358d981ad3c1e5880 Mon Sep 17 00:00:00 2001 From: Michael du Breuil Date: Thu, 11 Jun 2020 17:35:09 -0700 Subject: [PATCH] AP_Common: Add % operator to TSIndex --- libraries/AP_Common/TSIndex.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libraries/AP_Common/TSIndex.h b/libraries/AP_Common/TSIndex.h index 09b7a0ca8c..41821e6d78 100644 --- a/libraries/AP_Common/TSIndex.h +++ b/libraries/AP_Common/TSIndex.h @@ -49,6 +49,11 @@ public: return typesafe_index(p++); } + typesafe_index operator%(const base_type& val) + { + return typesafe_index(p % val); + } + bool operator<(const base_type& val) const { return (p