mirror of https://github.com/ArduPilot/ardupilot
AP_Common: add FALLTHROUGH define
This commit is contained in:
parent
bfe2acac33
commit
3102247a85
|
@ -39,6 +39,17 @@
|
|||
#define FMT_PRINTF(a,b) __attribute__((format(printf, a, b)))
|
||||
#define FMT_SCANF(a,b) __attribute__((format(scanf, a, b)))
|
||||
|
||||
#ifdef __has_cpp_attribute
|
||||
# if __has_cpp_attribute(fallthrough)
|
||||
# define FALLTHROUGH [[fallthrough]]
|
||||
# elif __has_cpp_attribute(gnu::fallthrough)
|
||||
# define FALLTHROUGH [[gnu::fallthrough]]
|
||||
# endif
|
||||
#endif
|
||||
#ifndef FALLTHROUGH
|
||||
# define FALLTHROUGH
|
||||
#endif
|
||||
|
||||
#define ToRad(x) radians(x) // *pi/180
|
||||
#define ToDeg(x) degrees(x) // *180/pi
|
||||
|
||||
|
|
Loading…
Reference in New Issue