Use wxUniChar instead of wxChar for operations with wxString iterators.
This commit is contained in:
@@ -1803,12 +1803,12 @@ wxString& wxPropertyGrid::CreateEscapeSequences( wxString& dst_str, wxString& sr
|
|||||||
return dst_str;
|
return dst_str;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString::const_iterator i = src_str.begin();
|
wxString::const_iterator i;
|
||||||
wxUniChar prev_a = wxS('\0');
|
wxUniChar prev_a = wxS('\0');
|
||||||
|
|
||||||
for ( ; i != src_str.end(); ++i )
|
for ( i = src_str.begin(); i != src_str.end(); ++i )
|
||||||
{
|
{
|
||||||
wxChar a = *i;
|
wxUniChar a = *i;
|
||||||
|
|
||||||
if ( a >= wxS(' ') )
|
if ( a >= wxS(' ') )
|
||||||
{
|
{
|
||||||
@@ -6174,14 +6174,13 @@ bool wxPGStringTokenizer::HasMoreTokens()
|
|||||||
wxString::const_iterator i = m_curPos;
|
wxString::const_iterator i = m_curPos;
|
||||||
|
|
||||||
wxUniChar delim = m_delimiter;
|
wxUniChar delim = m_delimiter;
|
||||||
wxUniChar a;
|
|
||||||
wxUniChar prev_a = wxS('\0');
|
wxUniChar prev_a = wxS('\0');
|
||||||
|
|
||||||
bool inToken = false;
|
bool inToken = false;
|
||||||
|
|
||||||
while ( i != str.end() )
|
while ( i != str.end() )
|
||||||
{
|
{
|
||||||
a = *i;
|
wxUniChar a = *i;
|
||||||
|
|
||||||
if ( !inToken )
|
if ( !inToken )
|
||||||
{
|
{
|
||||||
@@ -6522,19 +6521,19 @@ wxPGChoices wxPropertyGridPopulator::ParseChoices( const wxString& choicesString
|
|||||||
if ( !found )
|
if ( !found )
|
||||||
{
|
{
|
||||||
// Parse choices string
|
// Parse choices string
|
||||||
wxString::const_iterator it = choicesString.begin();
|
wxString::const_iterator it;
|
||||||
wxString label;
|
wxString label;
|
||||||
wxString value;
|
wxString value;
|
||||||
int state = 0;
|
int state = 0;
|
||||||
bool labelValid = false;
|
bool labelValid = false;
|
||||||
|
|
||||||
for ( ; it != choicesString.end(); ++it )
|
for ( it = choicesString.begin(); it != choicesString.end(); ++it )
|
||||||
{
|
{
|
||||||
wxChar c = *it;
|
wxUniChar c = *it;
|
||||||
|
|
||||||
if ( state != 1 )
|
if ( state != 1 )
|
||||||
{
|
{
|
||||||
if ( c == wxT('"') )
|
if ( c == wxS('"') )
|
||||||
{
|
{
|
||||||
if ( labelValid )
|
if ( labelValid )
|
||||||
{
|
{
|
||||||
@@ -6548,21 +6547,21 @@ wxPGChoices wxPropertyGridPopulator::ParseChoices( const wxString& choicesString
|
|||||||
label.clear();
|
label.clear();
|
||||||
state = 1;
|
state = 1;
|
||||||
}
|
}
|
||||||
else if ( c == wxT('=') )
|
else if ( c == wxS('=') )
|
||||||
{
|
{
|
||||||
if ( labelValid )
|
if ( labelValid )
|
||||||
{
|
{
|
||||||
state = 2;
|
state = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( state == 2 && (wxIsalnum(c) || c == wxT('x')) )
|
else if ( state == 2 && (wxIsalnum(c) || c == wxS('x')) )
|
||||||
{
|
{
|
||||||
value << c;
|
value << c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( c == wxT('"') )
|
if ( c == wxS('"') )
|
||||||
{
|
{
|
||||||
state = 0;
|
state = 0;
|
||||||
labelValid = true;
|
labelValid = true;
|
||||||
|
@@ -119,7 +119,7 @@ wxString wxStringProperty::ValueToString( wxVariant& value,
|
|||||||
// If string is password and value is for visual purposes,
|
// If string is password and value is for visual purposes,
|
||||||
// then return asterisks instead the actual string.
|
// then return asterisks instead the actual string.
|
||||||
if ( (m_flags & wxPG_PROP_PASSWORD) && !(argFlags & (wxPG_FULL_VALUE|wxPG_EDITABLE_VALUE)) )
|
if ( (m_flags & wxPG_PROP_PASSWORD) && !(argFlags & (wxPG_FULL_VALUE|wxPG_EDITABLE_VALUE)) )
|
||||||
return wxString(wxChar('*'), s.Length());
|
return wxString(wxS('*'), s.Length());
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
@@ -279,7 +279,7 @@ bool wxIntProperty::StringToValue( wxVariant& variant, const wxString& text, int
|
|||||||
|
|
||||||
for ( ; i != iMax; ++i )
|
for ( ; i != iMax; ++i )
|
||||||
{
|
{
|
||||||
wxChar c = *i;
|
wxUniChar c = *i;
|
||||||
if ( c != wxS('0') && c != wxS(' ') )
|
if ( c != wxS('0') && c != wxS(' ') )
|
||||||
break;
|
break;
|
||||||
firstNonZeroPos++;
|
firstNonZeroPos++;
|
||||||
@@ -879,7 +879,7 @@ const wxString& wxPropertyGrid::DoubleToString(wxString& target,
|
|||||||
new_len--;
|
new_len--;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxChar cur_char = *i;
|
wxUniChar cur_char = *i;
|
||||||
if ( cur_char != wxS('.') && cur_char != wxS(',') )
|
if ( cur_char != wxS('.') && cur_char != wxS(',') )
|
||||||
new_len++;
|
new_len++;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user