diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index 3c7574ea..30c76d41 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -12,6 +12,7 @@ #include "Map.h" #include "Music.h" #include "Screen.h" +#include "TempSDLFallthrough.h" #include "UtilityClass.h" #include "Vlogging.h" @@ -591,7 +592,7 @@ bool Graphics::next_wrap( break; case '\n': *start += 1; - VVV_fallthrough; + SDL_FALLTHROUGH; case '\0': return true; } diff --git a/desktop_version/src/TempSDLFallthrough.h b/desktop_version/src/TempSDLFallthrough.h new file mode 100644 index 00000000..20d78817 --- /dev/null +++ b/desktop_version/src/TempSDLFallthrough.h @@ -0,0 +1,22 @@ +#ifndef TEMPSDLFALLTHROUGH_H +#define TEMPSDLFALLTHROUGH_H + +/* FIXME: Delete this when SDL 2.0.18 releases! */ + +#include + +#ifndef SDL_FALLTHROUGH +# 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 + +# define SDL_FALLTHROUGH VVV_fallthrough +#endif + +#endif /* TEMPSDLFALLTHROUGH_H */ diff --git a/desktop_version/src/UtilityClass.h b/desktop_version/src/UtilityClass.h index cbda281a..50f33043 100644 --- a/desktop_version/src/UtilityClass.h +++ b/desktop_version/src/UtilityClass.h @@ -68,16 +68,6 @@ 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 - #define MAYBE_FAIL(expr) \ do \ { \