mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Add fallthrough macro
This macro needs to be used because Clang is stupid and doesn't let you use /* fallthrough */ comments like GCC does. However, if GCC is too old (as is the case on CentOS 7), then it won't recognize __has_attribute either.
This commit is contained in:
parent
3095871683
commit
ee02aa0499
1 changed files with 10 additions and 0 deletions
|
@ -68,6 +68,16 @@ void _VVV_between(
|
||||||
sizeof(middle) \
|
sizeof(middle) \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
#ifndef __has_attribute
|
||||||
|
# define __has_attribute(x) 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if __has_attribute(__fallthrough__)
|
||||||
|
# define VVV_fallthrough __attribute__((__fallthrough__))
|
||||||
|
#else
|
||||||
|
# define VVV_fallthrough do { } while (false) /* fallthrough */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
//helperClass
|
//helperClass
|
||||||
class UtilityClass
|
class UtilityClass
|
||||||
|
|
Loading…
Reference in a new issue