X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=libs%2Fcontainer%2Fhashfunc.h;fp=libs%2Fcontainer%2Fhashfunc.h;h=305202d0c9f00435bdcdab0c0798363abf5a8ef2;hb=951a604c7d78876b80383c309fb356712d7262b9;hp=6d2166971488b65e7601395d47a533c8aefe9d4e;hpb=8691e753e04ab691b9d702571125b5f03d1948ff;p=xonotic%2Fnetradiant.git diff --git a/libs/container/hashfunc.h b/libs/container/hashfunc.h index 6d216697..305202d0 100644 --- a/libs/container/hashfunc.h +++ b/libs/container/hashfunc.h @@ -203,17 +203,17 @@ inline ub4 hash( c += length; switch ( len ) /* all the case statements fall through */ { - case 11: c += ( ( ub4 ) UB1Traits::as_ub1( k[10] ) << 24 ); - case 10: c += ( ( ub4 ) UB1Traits::as_ub1( k[9] ) << 16 ); - case 9: c += ( ( ub4 ) UB1Traits::as_ub1( k[8] ) << 8 ); + case 11: c += ( ( ub4 ) UB1Traits::as_ub1( k[10] ) << 24 ); __attribute((fallthrough)); + case 10: c += ( ( ub4 ) UB1Traits::as_ub1( k[9] ) << 16 ); __attribute((fallthrough)); + case 9: c += ( ( ub4 ) UB1Traits::as_ub1( k[8] ) << 8 ); __attribute((fallthrough)); /* the first byte of c is reserved for the length */ - case 8: b += ( ( ub4 ) UB1Traits::as_ub1( k[7] ) << 24 ); - case 7: b += ( ( ub4 ) UB1Traits::as_ub1( k[6] ) << 16 ); - case 6: b += ( ( ub4 ) UB1Traits::as_ub1( k[5] ) << 8 ); - case 5: b += UB1Traits::as_ub1( k[4] ); - case 4: a += ( ( ub4 ) UB1Traits::as_ub1( k[3] ) << 24 ); - case 3: a += ( ( ub4 ) UB1Traits::as_ub1( k[2] ) << 16 ); - case 2: a += ( ( ub4 ) UB1Traits::as_ub1( k[1] ) << 8 ); + case 8: b += ( ( ub4 ) UB1Traits::as_ub1( k[7] ) << 24 ); __attribute((fallthrough)); + case 7: b += ( ( ub4 ) UB1Traits::as_ub1( k[6] ) << 16 ); __attribute((fallthrough)); + case 6: b += ( ( ub4 ) UB1Traits::as_ub1( k[5] ) << 8 ); __attribute((fallthrough)); + case 5: b += UB1Traits::as_ub1( k[4] ); __attribute((fallthrough)); + case 4: a += ( ( ub4 ) UB1Traits::as_ub1( k[3] ) << 24 ); __attribute((fallthrough)); + case 3: a += ( ( ub4 ) UB1Traits::as_ub1( k[2] ) << 16 ); __attribute((fallthrough)); + case 2: a += ( ( ub4 ) UB1Traits::as_ub1( k[1] ) << 8 ); __attribute((fallthrough)); case 1: a += UB1Traits::as_ub1( k[0] ); /* case 0: nothing left to add */ }