mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03: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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user