Skip to content

Commit

Permalink
[Core] : Move 'FALLTHROUGH' to 'Portability.h
Browse files Browse the repository at this point in the history
  • Loading branch information
msieben committed Aug 16, 2023
1 parent cb9a4ea commit 7517976
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
12 changes: 1 addition & 11 deletions Source/core/JSON.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
10 changes: 10 additions & 0 deletions Source/core/Portability.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7517976

Please sign in to comment.