diff options
Diffstat (limited to 'zencore/include')
| -rw-r--r-- | zencore/include/zencore/varint.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/zencore/include/zencore/varint.h b/zencore/include/zencore/varint.h index d7f2ebfb7..e57e1d497 100644 --- a/zencore/include/zencore/varint.h +++ b/zencore/include/zencore/varint.h @@ -120,27 +120,35 @@ ReadVarUInt(const void* InData, uint32_t& OutByteCount) case 8: Value <<= 8; Value |= *InBytes++; + [[fallthrough]]; case 7: Value <<= 8; Value |= *InBytes++; + [[fallthrough]]; case 6: Value <<= 8; Value |= *InBytes++; + [[fallthrough]]; case 5: Value <<= 8; Value |= *InBytes++; + [[fallthrough]]; case 4: Value <<= 8; Value |= *InBytes++; + [[fallthrough]]; case 3: Value <<= 8; Value |= *InBytes++; + [[fallthrough]]; case 2: Value <<= 8; Value |= *InBytes++; + [[fallthrough]]; case 1: Value <<= 8; Value |= *InBytes++; + [[fallthrough]]; default: return Value; } @@ -177,15 +185,19 @@ WriteVarUInt(uint32_t InValue, void* OutData) case 4: *OutBytes-- = uint8_t(InValue); InValue >>= 8; + [[fallthrough]]; case 3: *OutBytes-- = uint8_t(InValue); InValue >>= 8; + [[fallthrough]]; case 2: *OutBytes-- = uint8_t(InValue); InValue >>= 8; + [[fallthrough]]; case 1: *OutBytes-- = uint8_t(InValue); InValue >>= 8; + [[fallthrough]]; default: break; } @@ -210,27 +222,35 @@ WriteVarUInt(uint64_t InValue, void* OutData) case 8: *OutBytes-- = uint8_t(InValue); InValue >>= 8; + [[fallthrough]]; case 7: *OutBytes-- = uint8_t(InValue); InValue >>= 8; + [[fallthrough]]; case 6: *OutBytes-- = uint8_t(InValue); InValue >>= 8; + [[fallthrough]]; case 5: *OutBytes-- = uint8_t(InValue); InValue >>= 8; + [[fallthrough]]; case 4: *OutBytes-- = uint8_t(InValue); InValue >>= 8; + [[fallthrough]]; case 3: *OutBytes-- = uint8_t(InValue); InValue >>= 8; + [[fallthrough]]; case 2: *OutBytes-- = uint8_t(InValue); InValue >>= 8; + [[fallthrough]]; case 1: *OutBytes-- = uint8_t(InValue); InValue >>= 8; + [[fallthrough]]; default: break; } |