47        bool reverse = 
val > 
max / 2;
 
   50        int m        = 
val - (reverse ? 
max / 2 : 0);
 
   51        int M        = 
val + (reverse ? 0 : 
max / 2);
 
   53        return (m < other.
val && other.
val <= M) ^ reverse;
 
   61    static uint16_t 
next(uint16_t currentValue, uint16_t maxValue) {
 
   62        return ++currentValue >= maxValue ? 1 : currentValue;
 
   71    static bool isNewer(uint16_t previousValue, uint16_t currentValue, uint16_t maxValue) {
 
Increment administration object with 'none' value default.
Definition: cs_Lollipop.h:25
Lollipop(const Lollipop &l)=default
static bool isNewer(uint16_t previousValue, uint16_t currentValue, uint16_t maxValue)
Returns true when current value is newer than previous value.
Definition: cs_Lollipop.h:71
bool operator<(const Lollipop &other)
Definition: cs_Lollipop.h:36
Lollipop & operator++()
Definition: cs_Lollipop.h:76
uint16_t max
Definition: cs_Lollipop.h:28
static uint16_t next(uint16_t currentValue, uint16_t maxValue)
Return the next value given the current value.
Definition: cs_Lollipop.h:61
Lollipop(uint16_t m)
Definition: cs_Lollipop.h:31
Lollipop(uint16_t v, uint16_t m)
Definition: cs_Lollipop.h:32
Lollipop operator++(int)
Definition: cs_Lollipop.h:82
uint16_t val
Definition: cs_Lollipop.h:27