diff options
author | Tor Egge <Tor.Egge@broadpark.no> | 2018-05-27 02:35:33 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@broadpark.no> | 2018-05-27 18:22:20 +0000 |
commit | dc3b5a57b6706bb13a685e5f97d2517dd87b34e3 (patch) | |
tree | 098a7d1220d798edf23bc56847a4b2903a0bba2a /searchlib | |
parent | 2b33daa972f399b7734215ac03d8102cb68d7c1b (diff) |
Use fallthrough attributes.
Diffstat (limited to 'searchlib')
-rw-r--r-- | searchlib/src/vespa/searchlib/common/sortresults.cpp | 8 | ||||
-rw-r--r-- | searchlib/src/vespa/searchlib/predicate/predicate_hash.h | 46 |
2 files changed, 27 insertions, 27 deletions
diff --git a/searchlib/src/vespa/searchlib/common/sortresults.cpp b/searchlib/src/vespa/searchlib/common/sortresults.cpp index ed86014f7b3..e39f11f56b2 100644 --- a/searchlib/src/vespa/searchlib/common/sortresults.cpp +++ b/searchlib/src/vespa/searchlib/common/sortresults.cpp @@ -459,16 +459,16 @@ public: default: case 4: r |= _data[a._idx + a._pos + 3] << 0; - //@fallthrough@ + [[fallthrough]]; case 3: r |= _data[a._idx + a._pos + 2] << 8; - //@fallthrough@ + [[fallthrough]]; case 2: r |= _data[a._idx + a._pos + 1] << 16; - //@fallthrough@ + [[fallthrough]]; case 1: r |= _data[a._idx + a._pos + 0] << 24; - //@fallthrough@ + [[fallthrough]]; case 0:; } a._pos += std::min(4u, left); diff --git a/searchlib/src/vespa/searchlib/predicate/predicate_hash.h b/searchlib/src/vespa/searchlib/predicate/predicate_hash.h index 938b1bc5542..861a94d1990 100644 --- a/searchlib/src/vespa/searchlib/predicate/predicate_hash.h +++ b/searchlib/src/vespa/searchlib/predicate/predicate_hash.h @@ -75,30 +75,30 @@ struct PredicateHash { // handle the last 23 bytes c += origLen; switch(len) { // all the case statements fall through - case 23: c+=((0xffLL & aKey[offset+22])<<56); //@fallthrough@ - case 22: c+=((0xffLL & aKey[offset+21])<<48); //@fallthrough@ - case 21: c+=((0xffLL & aKey[offset+20])<<40); //@fallthrough@ - case 20: c+=((0xffLL & aKey[offset+19])<<32); //@fallthrough@ - case 19: c+=((0xffLL & aKey[offset+18])<<24); //@fallthrough@ - case 18: c+=((0xffLL & aKey[offset+17])<<16); //@fallthrough@ - case 17: c+=((0xffLL & aKey[offset+16])<<8); //@fallthrough@ + case 23: c+=((0xffLL & aKey[offset+22])<<56); [[fallthrough]]; + case 22: c+=((0xffLL & aKey[offset+21])<<48); [[fallthrough]]; + case 21: c+=((0xffLL & aKey[offset+20])<<40); [[fallthrough]]; + case 20: c+=((0xffLL & aKey[offset+19])<<32); [[fallthrough]]; + case 19: c+=((0xffLL & aKey[offset+18])<<24); [[fallthrough]]; + case 18: c+=((0xffLL & aKey[offset+17])<<16); [[fallthrough]]; + case 17: c+=((0xffLL & aKey[offset+16])<<8); [[fallthrough]]; // the first byte of c is reserved for the length - case 16: b+=((0xffLL & aKey[offset+15])<<56); //@fallthrough@ - case 15: b+=((0xffLL & aKey[offset+14])<<48); //@fallthrough@ - case 14: b+=((0xffLL & aKey[offset+13])<<40); //@fallthrough@ - case 13: b+=((0xffLL & aKey[offset+12])<<32); //@fallthrough@ - case 12: b+=((0xffLL & aKey[offset+11])<<24); //@fallthrough@ - case 11: b+=((0xffLL & aKey[offset+10])<<16); //@fallthrough@ - case 10: b+=((0xffLL & aKey[offset+ 9])<<8); //@fallthrough@ - case 9: b+=( 0xffLL & aKey[offset+ 8]); //@fallthrough@ - case 8: a+=((0xffLL & aKey[offset+ 7])<<56); //@fallthrough@ - case 7: a+=((0xffLL & aKey[offset+ 6])<<48); //@fallthrough@ - case 6: a+=((0xffLL & aKey[offset+ 5])<<40); //@fallthrough@ - case 5: a+=((0xffLL & aKey[offset+ 4])<<32); //@fallthrough@ - case 4: a+=((0xffLL & aKey[offset+ 3])<<24); //@fallthrough@ - case 3: a+=((0xffLL & aKey[offset+ 2])<<16); //@fallthrough@ - case 2: a+=((0xffLL & aKey[offset+ 1])<<8); //@fallthrough@ - case 1: a+=( 0xffLL & aKey[offset+ 0]); //@fallthrough@ + case 16: b+=((0xffLL & aKey[offset+15])<<56); [[fallthrough]]; + case 15: b+=((0xffLL & aKey[offset+14])<<48); [[fallthrough]]; + case 14: b+=((0xffLL & aKey[offset+13])<<40); [[fallthrough]]; + case 13: b+=((0xffLL & aKey[offset+12])<<32); [[fallthrough]]; + case 12: b+=((0xffLL & aKey[offset+11])<<24); [[fallthrough]]; + case 11: b+=((0xffLL & aKey[offset+10])<<16); [[fallthrough]]; + case 10: b+=((0xffLL & aKey[offset+ 9])<<8); [[fallthrough]]; + case 9: b+=( 0xffLL & aKey[offset+ 8]); [[fallthrough]]; + case 8: a+=((0xffLL & aKey[offset+ 7])<<56); [[fallthrough]]; + case 7: a+=((0xffLL & aKey[offset+ 6])<<48); [[fallthrough]]; + case 6: a+=((0xffLL & aKey[offset+ 5])<<40); [[fallthrough]]; + case 5: a+=((0xffLL & aKey[offset+ 4])<<32); [[fallthrough]]; + case 4: a+=((0xffLL & aKey[offset+ 3])<<24); [[fallthrough]]; + case 3: a+=((0xffLL & aKey[offset+ 2])<<16); [[fallthrough]]; + case 2: a+=((0xffLL & aKey[offset+ 1])<<8); [[fallthrough]]; + case 1: a+=( 0xffLL & aKey[offset+ 0]); // case 0: nothing left to add } |