1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 17:49: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:
Misa 2021-08-06 23:49:04 -07:00 committed by Ethan Lee
parent 3095871683
commit ee02aa0499

View file

@ -68,6 +68,16 @@ void _VVV_between(
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
class UtilityClass