Add macro for fallthrough in switch-case
This commit is contained in:
parent
cb4246e202
commit
b6f784f00e
|
@ -86,4 +86,16 @@
|
|||
# define IF_DEBUG_BUILD(x)
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* \def FALLTHROUGH
|
||||
* \brief Prevents clang from warning about missing break in switch-case.
|
||||
* \remarks Does nothing if another compiler is used.
|
||||
*/
|
||||
|
||||
#ifdef __clang__
|
||||
# define FALLTHROUGH [[clang::fallthrough]]
|
||||
# else
|
||||
# define FALLTHROUGH
|
||||
#endif
|
||||
|
||||
#endif // APPLICATION_UTILITIES_GLOBAL_H
|
||||
|
|
Loading…
Reference in New Issue