| 23 | namespace mmkv { |
| 24 | |
| 25 | uint32_t pbRawVarint32Size(uint32_t value) { |
| 26 | if ((value & (0xffffffff << 7)) == 0) { |
| 27 | return 1; |
| 28 | } else if ((value & (0xffffffff << 14)) == 0) { |
| 29 | return 2; |
| 30 | } else if ((value & (0xffffffff << 21)) == 0) { |
| 31 | return 3; |
| 32 | } else if ((value & (0xffffffff << 28)) == 0) { |
| 33 | return 4; |
| 34 | } |
| 35 | return 5; |
| 36 | } |
| 37 | |
| 38 | uint32_t pbUInt64Size(uint64_t value) { |
| 39 | if ((value & (0xffffffffffffffffL << 7)) == 0) { |
nothing calls this directly
no outgoing calls
no test coverage detected