34 #include <wx/string.h> 36 #if defined( __has_attribute ) 37 #define KI_HAS_ATTRIBUTE( x ) __has_attribute( x ) 39 #define KI_HAS_ATTRIBUTE( x ) 0 43 #if defined( __cplusplus ) && defined( __has_cpp_attribute ) 44 #define KI_HAS_CPP_ATTRIBUTE( x ) __has_cpp_attribute( x ) 46 #define KI_HAS_CPP_ATTRIBUTE( x ) 0 65 #if __cplusplus >= 201703L 67 #define KI_FALLTHROUGH [[fallthrough]] 69 #elif KI_HAS_CPP_ATTRIBUTE( clang::fallthrough ) 71 #define KI_FALLTHROUGH [[clang::fallthrough]] 73 #elif KI_HAS_CPP_ATTRIBUTE( gnu::fallthrough ) 75 #define KI_FALLTHROUGH [[gnu::fallthrough]] 77 #elif defined( __GNUC__ ) && __GNUC__ >= 7 79 #define KI_FALLTHROUGH __attribute__ ((fallthrough)) 83 #define KI_FALLTHROUGH ( ( void ) 0 ) 96 #define TO_UTF8( wxstring ) ( (const char*) (wxstring).utf8_str() ) 104 #define TO_STR2(x) #x 105 #define TO_STR(x) TO_STR2(x) 112 wxString line = wxString::FromUTF8( cstring );
115 line = wxConvCurrent->cMB2WC( cstring );
static wxString FROM_UTF8(const char *cstring)
Convert a UTF8 encoded C string to a wxString for all wxWidgets build modes.