diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-07-03 10:47:48 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-07-03 11:23:07 +0900 |
commit | eaca25fd5115ab00a29b7d47dfc6e16cbfd5e552 (patch) | |
tree | 7d9eb709c2a65c9e77dca52f3f66e4c4dcd2095d /lib/util.h | |
parent | ded46e7115cf9a3460a780f445a0c8ff22a628fa (diff) | |
download | libquotient-eaca25fd5115ab00a29b7d47dfc6e16cbfd5e552.tar.gz libquotient-eaca25fd5115ab00a29b7d47dfc6e16cbfd5e552.zip |
Roll various switch case fallthrough markers into a macro
Diffstat (limited to 'lib/util.h')
-rw-r--r-- | lib/util.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -27,6 +27,14 @@ #include <functional> #include <memory> +#if __cplusplus >= 201703L +#define FALLTHROUGH [[fallthrough]] +#elif __has_cpp_attribute(clang::fallthrough) +#define FALLTHROUGH [[clang::fallthrough]] +#else +#define FALLTHROUGH // -fallthrough +#endif + namespace QMatrixClient { // The below enables pretty-printing of enums in logs |