diff options
author | Moonchild <moonchild@palemoon.org> | 2023-11-12 20:30:17 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2023-11-12 20:30:17 +0000 |
commit | db4ddc5f6855fdd89cf2af9090f78fb7ebb7f032 (patch) | |
tree | 8036ebc434967a0cde3de705a16faea54d117bfd /netwerk/cache2/CacheHashUtils.cpp | |
parent | c789882a294d29b3e5450a972ad67c4839c75e23 (diff) | |
parent | 9c75c8235e13e0f8309b11fa138253350bce0dd5 (diff) | |
download | uxp-db4ddc5f6855fdd89cf2af9090f78fb7ebb7f032.tar.gz |
Merge pull request 'Replace MOZ_FALLTHROUGH with [[fallthrough]]' (#2379) from 2343-fallthrough-work into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2379
Diffstat (limited to 'netwerk/cache2/CacheHashUtils.cpp')
-rw-r--r-- | netwerk/cache2/CacheHashUtils.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/netwerk/cache2/CacheHashUtils.cpp b/netwerk/cache2/CacheHashUtils.cpp index 6783f0b869..3dd169c420 100644 --- a/netwerk/cache2/CacheHashUtils.cpp +++ b/netwerk/cache2/CacheHashUtils.cpp @@ -58,17 +58,17 @@ CacheHash::Hash(const char *aData, uint32_t aSize, uint32_t aInitval) /*------------------------------------- handle the last 11 bytes */ c += aSize; switch(len) { /* all the case statements fall through */ - case 11: c += (uint32_t(k[10])<<24); MOZ_FALLTHROUGH; - case 10: c += (uint32_t(k[9])<<16); MOZ_FALLTHROUGH; - case 9 : c += (uint32_t(k[8])<<8); MOZ_FALLTHROUGH; + case 11: c += (uint32_t(k[10])<<24); [[fallthrough]]; + case 10: c += (uint32_t(k[9])<<16); [[fallthrough]]; + case 9 : c += (uint32_t(k[8])<<8); [[fallthrough]]; /* the low-order byte of c is reserved for the length */ - case 8 : b += (uint32_t(k[7])<<24); MOZ_FALLTHROUGH; - case 7 : b += (uint32_t(k[6])<<16); MOZ_FALLTHROUGH; - case 6 : b += (uint32_t(k[5])<<8); MOZ_FALLTHROUGH; - case 5 : b += k[4]; MOZ_FALLTHROUGH; - case 4 : a += (uint32_t(k[3])<<24); MOZ_FALLTHROUGH; - case 3 : a += (uint32_t(k[2])<<16); MOZ_FALLTHROUGH; - case 2 : a += (uint32_t(k[1])<<8); MOZ_FALLTHROUGH; + case 8 : b += (uint32_t(k[7])<<24); [[fallthrough]]; + case 7 : b += (uint32_t(k[6])<<16); [[fallthrough]]; + case 6 : b += (uint32_t(k[5])<<8); [[fallthrough]]; + case 5 : b += k[4]; [[fallthrough]]; + case 4 : a += (uint32_t(k[3])<<24); [[fallthrough]]; + case 3 : a += (uint32_t(k[2])<<16); [[fallthrough]]; + case 2 : a += (uint32_t(k[1])<<8); [[fallthrough]]; case 1 : a += k[0]; /* case 0: nothing left to add */ } @@ -158,8 +158,8 @@ CacheHash::Update(const char *aData, uint32_t aLen) } switch (aLen) { - case 3: mBuf += data[2] << 16; MOZ_FALLTHROUGH; - case 2: mBuf += data[1] << 8; MOZ_FALLTHROUGH; + case 3: mBuf += data[2] << 16; [[fallthrough]]; + case 2: mBuf += data[1] << 8; [[fallthrough]]; case 1: mBuf += data[0]; } |