From 7517976cffe2aadab80ca002032af1ba7b2b0fad Mon Sep 17 00:00:00 2001 From: msieben <4319079+msieben@users.noreply.github.com> Date: Wed, 16 Aug 2023 12:10:55 +0000 Subject: [PATCH] [Core] : Move 'FALLTHROUGH' to 'Portability.h --- Source/core/JSON.h | 12 +----------- Source/core/Portability.h | 10 ++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Source/core/JSON.h b/Source/core/JSON.h index 2092eb67f..1a959f5e4 100644 --- a/Source/core/JSON.h +++ b/Source/core/JSON.h @@ -32,17 +32,7 @@ #include "TextFragment.h" #include "TypeTraits.h" -#ifndef __has_cpp_attribute -# define __has_cpp_attribute(x) 0 -#endif - -#if __has_cpp_attribute(fallthrough) -# define FALLTHROUGH [[fallthrough]]; -#else -# define FALLTHROUGH do{} while(0); -#endif - - namespace WPEFramework { +namespace WPEFramework { namespace Core { diff --git a/Source/core/Portability.h b/Source/core/Portability.h index 0dabe921d..88b782853 100644 --- a/Source/core/Portability.h +++ b/Source/core/Portability.h @@ -957,6 +957,16 @@ namespace std { #endif #endif +#ifndef __has_cpp_attribute +# define __has_cpp_attribute(x) 0 +#endif + +#if __has_cpp_attribute(fallthrough) +# define FALLTHROUGH [[fallthrough]]; +#else +# define FALLTHROUGH do{} while(0); +#endif + #define THUNDER_VERSION 4 #endif // __PORTABILITY_H