adding wxFALLTHROUGH to indicate intended fall through in switch statements

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76236 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2014-03-31 15:28:55 +00:00
parent 3fa022c8b6
commit bdb7453c7b

View File

@@ -299,6 +299,18 @@ typedef short int WXTYPE;
#define wxOVERRIDE
#endif /* HAVE_OVERRIDE/!HAVE_EXPLICIT */
/* wxFALLTHROUGH is used to notate explicit fallthroughs in switch statements */
#if __cplusplus >= 201103L && defined(__has_warning)
#if WX_HAS_CLANG_FEATURE(cxx_attributes)
#define wxFALLTHROUGH [[clang::fallthrough]]
#endif
#endif
#ifndef wxFALLTHROUGH
#define wxFALLTHROUGH ((void)0)
#endif
/* these macros are obsolete, use the standard C++ casts directly now */
#define wx_static_cast(t, x) static_cast<t>(x)
#define wx_const_cast(t, x) const_cast<t>(x)