aboutsummaryrefslogtreecommitdiff
path: root/src/tinyformat.h
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-03-13 21:23:17 +0200
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-07-05 08:59:38 +0300
commit014110c47d94ece6e3e655cdbf02ed8c91c7a5cf (patch)
treee8081ec6eb17c133d84b3457561021f5252e0807 /src/tinyformat.h
parent7a49fdc58115845ece3a9890bf9498bee6b559de (diff)
downloadbitcoin-014110c47d94ece6e3e655cdbf02ed8c91c7a5cf.tar.xz
Use C++17 [[fallthrough]] attribute, and drop -Wno-implicit-fallthrough
Diffstat (limited to 'src/tinyformat.h')
-rw-r--r--src/tinyformat.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tinyformat.h b/src/tinyformat.h
index bc893ccda5..bedaa14007 100644
--- a/src/tinyformat.h
+++ b/src/tinyformat.h
@@ -797,27 +797,27 @@ inline const char* streamStateFromFormat(std::ostream& out, bool& positionalMode
break;
case 'X':
out.setf(std::ios::uppercase);
- // Falls through
+ [[fallthrough]];
case 'x': case 'p':
out.setf(std::ios::hex, std::ios::basefield);
intConversion = true;
break;
case 'E':
out.setf(std::ios::uppercase);
- // Falls through
+ [[fallthrough]];
case 'e':
out.setf(std::ios::scientific, std::ios::floatfield);
out.setf(std::ios::dec, std::ios::basefield);
break;
case 'F':
out.setf(std::ios::uppercase);
- // Falls through
+ [[fallthrough]];
case 'f':
out.setf(std::ios::fixed, std::ios::floatfield);
break;
case 'A':
out.setf(std::ios::uppercase);
- // Falls through
+ [[fallthrough]];
case 'a':
# ifdef _MSC_VER
// Workaround https://developercommunity.visualstudio.com/content/problem/520472/hexfloat-stream-output-does-not-ignore-precision-a.html
@@ -829,7 +829,7 @@ inline const char* streamStateFromFormat(std::ostream& out, bool& positionalMode
break;
case 'G':
out.setf(std::ios::uppercase);
- // Falls through
+ [[fallthrough]];
case 'g':
out.setf(std::ios::dec, std::ios::basefield);
// As in boost::format, let stream decide float format.