Add wxNO_UNSAFE_WXSTRING_CONV2 macro
The macro disallows implicit conversions between wxString and const char*
This commit is contained in:
committed by
Vadim Zeitlin
parent
15a4375f93
commit
65cbf40b7e
@@ -20,6 +20,12 @@ class WXDLLIMPEXP_FWD_CORE wxColour;
|
||||
//
|
||||
// It avoids the need to repeat these lines across all colour.h files, since
|
||||
// Set() is a virtual function and thus cannot be called by wxColourBase ctors
|
||||
#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
|
||||
#define wxWXCOLOUR_CTOR_FROM_CHAR \
|
||||
wxColour(const char *colourName) { Init(); Set(colourName); }
|
||||
#else // wxNO_IMPLICIT_WXSTRING_ENCODING
|
||||
#define wxWXCOLOUR_CTOR_FROM_CHAR
|
||||
#endif
|
||||
#define DEFINE_STD_WXCOLOUR_CONSTRUCTORS \
|
||||
wxColour() { Init(); } \
|
||||
wxColour(ChannelType red, \
|
||||
@@ -29,7 +35,7 @@ class WXDLLIMPEXP_FWD_CORE wxColour;
|
||||
{ Init(); Set(red, green, blue, alpha); } \
|
||||
wxColour(unsigned long colRGB) { Init(); Set(colRGB ); } \
|
||||
wxColour(const wxString& colourName) { Init(); Set(colourName); } \
|
||||
wxColour(const char *colourName) { Init(); Set(colourName); } \
|
||||
wxWXCOLOUR_CTOR_FROM_CHAR \
|
||||
wxColour(const wchar_t *colourName) { Init(); Set(colourName); }
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user