From f2fd4885c2a906414e0f36acf95d252e5a9d5805 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Tue, 8 Jan 2013 19:00:34 -0800 Subject: Improve warning management more --- src/common/utils2.hpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/common/utils2.hpp') diff --git a/src/common/utils2.hpp b/src/common/utils2.hpp index 7b2bc4a..3b652d5 100644 --- a/src/common/utils2.hpp +++ b/src/common/utils2.hpp @@ -4,6 +4,12 @@ #include #include +#ifdef __clang__ +# define FALLTHROUGH [[clang::fallthrough]] +#else +# define FALLTHROUGH /* fallthrough */ +#endif + template struct earray { @@ -109,19 +115,19 @@ struct remove_enum inline \ E operator & (E l, E r) \ { \ - typedef typename underlying_type::type U;\ + typedef underlying_type::type U; \ return E(U(l) & U(r)); \ } \ inline \ E operator | (E l, E r) \ { \ - typedef typename underlying_type::type U;\ + typedef underlying_type::type U; \ return E(U(l) | U(r)); \ } \ inline \ E operator ^ (E l, E r) \ { \ - typedef typename underlying_type::type U;\ + typedef underlying_type::type U; \ return E(U(l) ^ U(r)); \ } \ inline \ -- cgit v1.2.3-70-g09d2