Skip to content

Commit

Permalink
Add [[fallthrough]] attribute to case statements when appropriate.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cory-Kramer committed Jul 28, 2023
1 parent 6c1a309 commit a8e71ef
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions opensubdiv/bfr/hash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,47 +388,47 @@ void SpookyHash::Short(
{
case 15:
d += ((uint64)u.p8[14]) << 48;
// FALLTHRU
[[fallthrough]];
case 14:
d += ((uint64)u.p8[13]) << 40;
// FALLTHRU
[[fallthrough]];
case 13:
d += ((uint64)u.p8[12]) << 32;
// FALLTHRU
[[fallthrough]];
case 12:
d += u.p32[2];
c += u.p64[0];
break;
case 11:
d += ((uint64)u.p8[10]) << 16;
// FALLTHRU
[[fallthrough]];
case 10:
d += ((uint64)u.p8[9]) << 8;
// FALLTHRU
[[fallthrough]];
case 9:
d += (uint64)u.p8[8];
// FALLTHRU
[[fallthrough]];
case 8:
c += u.p64[0];
break;
case 7:
c += ((uint64)u.p8[6]) << 48;
// FALLTHRU
[[fallthrough]];
case 6:
c += ((uint64)u.p8[5]) << 40;
// FALLTHRU
[[fallthrough]];
case 5:
c += ((uint64)u.p8[4]) << 32;
// FALLTHRU
[[fallthrough]];
case 4:
c += u.p32[0];
break;
case 3:
c += ((uint64)u.p8[2]) << 16;
// FALLTHRU
[[fallthrough]];
case 2:
c += ((uint64)u.p8[1]) << 8;
// FALLTHRU
[[fallthrough]];
case 1:
c += (uint64)u.p8[0];
break;
Expand Down

0 comments on commit a8e71ef

Please sign in to comment.