Replace isdigit() with wxIsdigit() when testing wxString characters.
This is a continuation of commit 8a03025a
. All known instances of
using isdigit() to test a character in a wxString have been replaced
by wxIsdigit().
This commit is contained in:
parent
49ac89bfed
commit
f7b4a20066
|
@ -167,12 +167,12 @@ void SelectReferenceNumber( wxTextEntry* aTextEntry )
|
|||
{
|
||||
wxString num = ref;
|
||||
|
||||
while( !num.IsEmpty() && ( !isdigit( num.Last() ) || !isdigit( num.GetChar( 0 ) ) ) )
|
||||
while( !num.IsEmpty() && ( !wxIsdigit( num.Last() ) || !wxIsdigit( num.GetChar( 0 ) ) ) )
|
||||
{
|
||||
if( !isdigit( num.Last() ) )
|
||||
if( !wxIsdigit( num.Last() ) )
|
||||
num.RemoveLast();
|
||||
|
||||
if( !isdigit( num.GetChar ( 0 ) ) )
|
||||
if( !wxIsdigit( num.GetChar ( 0 ) ) )
|
||||
num = num.Right( num.Length() - 1);
|
||||
}
|
||||
|
||||
|
|
|
@ -566,7 +566,7 @@ int SplitString( wxString strToSplit,
|
|||
|
||||
for( ii = (strToSplit.length() - 1); ii >= 0; ii-- )
|
||||
{
|
||||
if( isdigit( strToSplit[ii] ) )
|
||||
if( wxIsdigit( strToSplit[ii] ) )
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -585,7 +585,7 @@ int SplitString( wxString strToSplit,
|
|||
|
||||
for( ; ii >= 0; ii-- )
|
||||
{
|
||||
if( !isdigit( strToSplit[ii] ) && separators.Find( strToSplit[ii] ) < 0 )
|
||||
if( !wxIsdigit( strToSplit[ii] ) && separators.Find( strToSplit[ii] ) < 0 )
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -290,10 +290,10 @@ void IncrementLabelMember( wxString& name, int aIncrement )
|
|||
|
||||
ii = name.Len() - 1; nn = 0;
|
||||
|
||||
if( !isdigit( name.GetChar( ii ) ) )
|
||||
if( !wxIsdigit( name.GetChar( ii ) ) )
|
||||
return;
|
||||
|
||||
while( (ii >= 0) && isdigit( name.GetChar( ii ) ) )
|
||||
while( (ii >= 0) && wxIsdigit( name.GetChar( ii ) ) )
|
||||
{
|
||||
ii--; nn++;
|
||||
}
|
||||
|
|
|
@ -33,16 +33,16 @@ wxString GetNextComponent( const wxString& str, wxString::size_type& cursor )
|
|||
|
||||
wxString::size_type begin = cursor;
|
||||
|
||||
wxUniChar c = str[cursor];
|
||||
wxChar c = str[cursor];
|
||||
|
||||
if( isdigit( c ) || c == '+' || c == '-' )
|
||||
if( wxIsdigit( c ) || c == '+' || c == '-' )
|
||||
{
|
||||
// number, possibly with sign
|
||||
while( ++cursor < str.size() )
|
||||
{
|
||||
c = str[cursor];
|
||||
|
||||
if( isdigit( c ) || c == 'v' || c == 'V' )
|
||||
if( wxIsdigit( c ) || c == 'v' || c == 'V' )
|
||||
continue;
|
||||
else
|
||||
break;
|
||||
|
@ -54,7 +54,7 @@ wxString GetNextComponent( const wxString& str, wxString::size_type& cursor )
|
|||
{
|
||||
c = str[cursor];
|
||||
|
||||
if( isdigit( c ) )
|
||||
if( wxIsdigit( c ) )
|
||||
break;
|
||||
else
|
||||
continue;
|
||||
|
@ -128,12 +128,12 @@ int PinNumbers::Compare( const PinNumber& lhs, const PinNumber& rhs )
|
|||
if( comp2.empty() )
|
||||
return 2;
|
||||
|
||||
wxUniChar c1 = comp1[0];
|
||||
wxUniChar c2 = comp2[0];
|
||||
wxChar c1 = comp1[0];
|
||||
wxChar c2 = comp2[0];
|
||||
|
||||
if( isdigit( c1 ) || c1 == '-' || c1 == '+' )
|
||||
if( wxIsdigit( c1 ) || c1 == '-' || c1 == '+' )
|
||||
{
|
||||
if( isdigit( c2 ) || c2 == '-' || c2 == '+' )
|
||||
if( wxIsdigit( c2 ) || c2 == '-' || c2 == '+' )
|
||||
{
|
||||
// numeric comparison
|
||||
wxString::size_type v1 = comp1.find_first_of( "vV" );
|
||||
|
@ -172,7 +172,7 @@ int PinNumbers::Compare( const PinNumber& lhs, const PinNumber& rhs )
|
|||
}
|
||||
else
|
||||
{
|
||||
if( isdigit( c2 ) || c2 == '-' || c2 == '+' )
|
||||
if( wxIsdigit( c2 ) || c2 == '-' || c2 == '+' )
|
||||
return 2;
|
||||
|
||||
int res = comp1.Cmp( comp2 );
|
||||
|
|
|
@ -732,7 +732,7 @@ bool SCH_COMPONENT::IsReferenceStringValid( const wxString& aReferenceString )
|
|||
bool ok = true;
|
||||
|
||||
// Try to unannotate this reference
|
||||
while( !text.IsEmpty() && ( text.Last() == '?' || std::isdigit( text.Last().GetValue() ) ) )
|
||||
while( !text.IsEmpty() && ( text.Last() == '?' || wxIsdigit( text.Last() ) ) )
|
||||
text.RemoveLast();
|
||||
|
||||
if( text.IsEmpty() )
|
||||
|
@ -795,7 +795,7 @@ void SCH_COMPONENT::SetRef( const SCH_SHEET_PATH* sheet, const wxString& ref )
|
|||
|
||||
if( IsReferenceStringValid( prefix ) )
|
||||
{
|
||||
while( prefix.Last() == '?' || std::isdigit( prefix.Last().GetValue() ) )
|
||||
while( prefix.Last() == '?' || wxIsdigit( prefix.Last() ) )
|
||||
prefix.RemoveLast();
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue