AP_Common: Add % operator to TSIndex

This commit is contained in:
Michael du Breuil 2020-06-11 17:35:09 -07:00 committed by Andrew Tridgell
parent b3a2b360e6
commit ab2dea5b86
1 changed files with 6 additions and 1 deletions

View File

@ -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<val);
@ -110,4 +115,4 @@ public:
{
return _priv_instance[index.get_int()];
}
};
};