increase val if no overflow, otherwise do nothing
| 27 | namespace { |
| 28 | // increase val if no overflow, otherwise do nothing |
| 29 | uint8_t safeInc(uint8_t val) { |
| 30 | if (val < std::numeric_limits<uint8_t>::max()) { |
| 31 | return val + 1; |
| 32 | } |
| 33 | return val; |
| 34 | } |
| 35 | } // namespace |
| 36 | |
| 37 | class SparseMapIndex::IteratorImpl final : public Index::Iterator::Impl { |