| 121 | |
| 122 | |
| 123 | bool Set::isFull() |
| 124 | { |
| 125 | // check two elements per loop |
| 126 | // is faster for full sets but slower for empty set. |
| 127 | // footprint is ~25 bytes larger |
| 128 | // overall performance gain |
| 129 | uint8_t i = 32; |
| 130 | do |
| 131 | { |
| 132 | if ((_mem[--i]) != 255) return false; |
| 133 | } |
| 134 | while (i != 0); |
| 135 | return true; |
| 136 | } |
| 137 | |
| 138 | |
| 139 | int Set::setCurrent(const uint8_t current) |