1. made CRT wrappers definitions indepenent of wxUSE_UNICODE: both ANSI and Unicode variants are now defined
2. split wxcrt.h into wxcrtbase.h with lowlevel compiler-specific definitions and wxcrt.h with ANSI- and Unicode-compatible wx wrappers git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -46,7 +46,7 @@ bool wxColourBase::FromString(const wxString& str)
|
||||
// according to http://www.w3.org/TR/REC-CSS2/syndata.html#color-units
|
||||
// values outside 0-255 range are allowed but should be clipped
|
||||
int red, green, blue;
|
||||
if (wxSscanf(str.substr(3), wxT("(%d, %d, %d)"), &red, &green, &blue) != 3)
|
||||
if (wxSscanf(str.wx_str() + 3, wxT("(%d, %d, %d)"), &red, &green, &blue) != 3)
|
||||
return false;
|
||||
|
||||
Set((unsigned char)wxClip(red,0,255),
|
||||
@@ -57,7 +57,7 @@ bool wxColourBase::FromString(const wxString& str)
|
||||
{
|
||||
// hexadecimal prefixed with # (HTML syntax)
|
||||
unsigned long tmp;
|
||||
if (wxSscanf(str.substr(1), wxT("%lx"), &tmp) != 1)
|
||||
if (wxSscanf(str.wx_str() + 1, wxT("%lx"), &tmp) != 1)
|
||||
return false;
|
||||
|
||||
Set((unsigned char)(tmp >> 16),
|
||||
|
||||
Reference in New Issue
Block a user