aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2018-05-27 21:49:00 +0200
committerGitHub <noreply@github.com>2018-05-27 21:49:00 +0200
commitda7b3afc9a294dd5512db1fa8716449f9bd03b70 (patch)
tree8c45fd5e6e3d6f32aeaae092e4cb16cc680da4c2 /vespalib
parent62987b105335fc5617122c1872eb691b1403e91d (diff)
parentdc3b5a57b6706bb13a685e5f97d2517dd87b34e3 (diff)
Merge pull request #5957 from vespa-engine/toregge/use-fallthrough-attributes
Use fallthrough attributes.
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/vespa/vespalib/data/slime/json_format.cpp2
-rw-r--r--vespalib/src/vespa/vespalib/util/bobhash.h22
2 files changed, 12 insertions, 12 deletions
diff --git a/vespalib/src/vespa/vespalib/data/slime/json_format.cpp b/vespalib/src/vespa/vespalib/data/slime/json_format.cpp
index 18bf5289f0d..72b494e2479 100644
--- a/vespalib/src/vespa/vespalib/data/slime/json_format.cpp
+++ b/vespalib/src/vespa/vespalib/data/slime/json_format.cpp
@@ -422,7 +422,7 @@ JsonDecoder::decodeNumber(Inserter &inserter)
switch (c) {
case '+': case '-': case '.': case 'e': case 'E':
isLong = false;
- //@fallthrough@
+ [[fallthrough]];
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
value.push_back(c);
diff --git a/vespalib/src/vespa/vespalib/util/bobhash.h b/vespalib/src/vespa/vespalib/util/bobhash.h
index 2aff09929b2..60cbe2cbca3 100644
--- a/vespalib/src/vespa/vespalib/util/bobhash.h
+++ b/vespalib/src/vespa/vespalib/util/bobhash.h
@@ -128,18 +128,18 @@ public:
c += length;
switch(len) /* all the case statements fall through */
{
- case 11: c += (static_cast<uint32_t>(k[10]) << 24); //@fallthrough@
- case 10: c += (static_cast<uint32_t>(k[9]) << 16); //@fallthrough@
- case 9 : c += (static_cast<uint32_t>(k[8]) << 8); //@fallthrough@
+ case 11: c += (static_cast<uint32_t>(k[10]) << 24); [[fallthrough]];
+ case 10: c += (static_cast<uint32_t>(k[9]) << 16); [[fallthrough]];
+ case 9 : c += (static_cast<uint32_t>(k[8]) << 8); [[fallthrough]];
/* the first byte of c is reserved for the length */
- case 8 : b += (static_cast<uint32_t>(k[7]) << 24); //@fallthrough@
- case 7 : b += (static_cast<uint32_t>(k[6]) << 16); //@fallthrough@
- case 6 : b += (static_cast<uint32_t>(k[5]) << 8); //@fallthrough@
- case 5 : b += k[4]; //@fallthrough@
- case 4 : a += (static_cast<uint32_t>(k[3]) << 24); //@fallthrough@
- case 3 : a += (static_cast<uint32_t>(k[2]) << 16); //@fallthrough@
- case 2 : a += (static_cast<uint32_t>(k[1]) << 8); //@fallthrough@
- case 1 : a += k[0]; //@fallthrough@
+ case 8 : b += (static_cast<uint32_t>(k[7]) << 24); [[fallthrough]];
+ case 7 : b += (static_cast<uint32_t>(k[6]) << 16); [[fallthrough]];
+ case 6 : b += (static_cast<uint32_t>(k[5]) << 8); [[fallthrough]];
+ case 5 : b += k[4]; [[fallthrough]];
+ case 4 : a += (static_cast<uint32_t>(k[3]) << 24); [[fallthrough]];
+ case 3 : a += (static_cast<uint32_t>(k[2]) << 16); [[fallthrough]];
+ case 2 : a += (static_cast<uint32_t>(k[1]) << 8); [[fallthrough]];
+ case 1 : a += k[0];
/* case 0: nothing left to add */
}
bobhash_mix(a,b,c);