Replace wxChar with wxStringCharType in wxPropertyGrid code.

This commit is contained in:
Artur Wieczorek 2015-06-04 22:51:34 +02:00
parent 5973ad196e
commit f7322af25e
3 changed files with 13 additions and 12 deletions

View File

@ -1870,13 +1870,14 @@ wxVariant wxPGProperty::GetAttributesAsList() const
// Slots of utility flags are NULL
const unsigned int gs_propFlagToStringSize = 14;
static const wxChar* const gs_propFlagToString[gs_propFlagToStringSize] = {
// Store the literals in the internal representation for better performance.
static const wxStringCharType* const gs_propFlagToString[gs_propFlagToStringSize] = {
NULL,
wxT("DISABLED"),
wxT("HIDDEN"),
wxS("DISABLED"),
wxS("HIDDEN"),
NULL,
wxT("NOEDITOR"),
wxT("COLLAPSED"),
wxS("NOEDITOR"),
wxS("COLLAPSED"),
NULL,
NULL,
NULL,
@ -1897,7 +1898,7 @@ wxString wxPGProperty::GetFlagsAsString( FlagType flagsMask ) const
{
if ( relevantFlags & a )
{
const wxChar* fs = gs_propFlagToString[i];
const wxStringCharType* fs = gs_propFlagToString[i];
wxASSERT(fs);
if ( !s.empty() )
s << wxS("|");
@ -1916,7 +1917,7 @@ void wxPGProperty::SetFlagsFromString( const wxString& str )
WX_PG_TOKENIZER1_BEGIN(str, wxS('|'))
for ( unsigned int i = 0; i < gs_propFlagToStringSize; i++ )
{
const wxChar* fs = gs_propFlagToString[i];
const wxStringCharType* fs = gs_propFlagToString[i];
if ( fs && str == fs )
{
flags |= (1<<i);

View File

@ -6168,7 +6168,7 @@ bool wxPGStringTokenizer::HasMoreTokens()
wxUniChar delim = m_delimeter;
wxUniChar a;
wxUniChar prev_a = wxT('\0');
wxUniChar prev_a = wxS('\0');
bool inToken = false;
@ -6186,11 +6186,11 @@ bool wxPGStringTokenizer::HasMoreTokens()
}
else
{
if ( prev_a != wxT('\\') )
if ( prev_a != wxS('\\') )
{
if ( a != delim )
{
if ( a != wxT('\\') )
if ( a != wxS('\\') )
m_readyToken << a;
}
else
@ -6204,7 +6204,7 @@ bool wxPGStringTokenizer::HasMoreTokens()
else
{
m_readyToken << a;
prev_a = wxT('\0');
prev_a = wxS('\0');
}
}
++i;

View File

@ -544,7 +544,7 @@ wxPGProperty* wxPropertyGridInterface::GetPropertyByName( const wxString& name )
return p;
// Check if its "Property.SubProperty" format
int pos = name.Find(wxT('.'));
int pos = name.Find(wxS('.'));
if ( pos <= 0 )
return NULL;