Loading common/edaappl.cpp +1 −6 Original line number Diff line number Diff line Loading @@ -57,11 +57,6 @@ static const wxChar* CommonConfigPath = wxT( "kicad_common" ); #ifdef __UNIX__ # define TMP_FILE "/tmp/kicad.tmp" #endif // some key strings used to store parameters in config static const wxChar backgroundColorKey[] = wxT( "BackgroundColor" ); static const wxChar showPageLimitsKey[] = wxT( "ShowPageLimits" ); Loading Loading @@ -90,7 +85,7 @@ struct LANGUAGE_DESCR BITMAP_DEF m_Lang_Icon; /// Labels used in menus const wxChar* m_Lang_Label; wxString m_Lang_Label; /// Set to true if the m_Lang_Label must not be translated bool m_DoNotTranslate; Loading common/gr_basic.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -1451,12 +1451,12 @@ EDA_COLOR_T ColorMix( EDA_COLOR_T aColor1, EDA_COLOR_T aColor2 ) } EDA_COLOR_T ColorByName( const wxChar *aName ) EDA_COLOR_T ColorByName( const wxString& aName ) { // look for a match in the palette itself for( EDA_COLOR_T trying = BLACK; trying < NBCOLORS; trying = NextColor(trying) ) { if( 0 == wxStricmp( aName, g_ColorRefs[trying].m_Name ) ) if( 0 == aName.CmpNoCase( g_ColorRefs[trying].m_Name ) ) return trying; } Loading common/page_layout/class_worksheet_dataitem.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -430,7 +430,7 @@ const wxPoint WORKSHEET_DATAITEM_POLYPOLYGON::GetCornerPositionUi( unsigned aIdx return wxPoint( int(pos.x), int(pos.y) ); } WORKSHEET_DATAITEM_TEXT::WORKSHEET_DATAITEM_TEXT( const wxChar* aTextBase ) : WORKSHEET_DATAITEM_TEXT::WORKSHEET_DATAITEM_TEXT( const wxString& aTextBase ) : WORKSHEET_DATAITEM( WS_TEXT ) { m_TextBase = aTextBase; Loading common/string.cpp +19 −17 Original line number Diff line number Diff line Loading @@ -211,31 +211,33 @@ wxString DateAndTime() } int StrNumCmp( const wxChar* aString1, const wxChar* aString2, int aLength, bool aIgnoreCase ) int StrNumCmp( const wxString& aString1, const wxString& aString2, int aLength, bool aIgnoreCase ) { int i; int nb1 = 0, nb2 = 0; if( ( aString1 == NULL ) || ( aString2 == NULL ) ) wxString::const_iterator str1 = aString1.begin(), str2 = aString2.begin(); if( ( str1 == aString1.end() ) || ( str2 == aString2.end() ) ) return 0; for( i = 0; i < aLength; i++ ) { if( isdigit( *aString1 ) && isdigit( *aString2 ) ) /* digit found */ if( isdigit( *str1 ) && isdigit( *str2 ) ) /* digit found */ { nb1 = 0; nb2 = 0; while( isdigit( *aString1 ) ) while( isdigit( *str1 ) ) { nb1 = nb1 * 10 + *aString1 - '0'; aString1++; nb1 = nb1 * 10 + (int) *str1 - '0'; str1++; } while( isdigit( *aString2 ) ) while( isdigit( *str2 ) ) { nb2 = nb2 * 10 + *aString2 - '0'; aString2++; nb2 = nb2 * 10 + (int) *str2 - '0'; str2++; } if( nb1 < nb2 ) Loading @@ -247,29 +249,29 @@ int StrNumCmp( const wxChar* aString1, const wxChar* aString2, int aLength, bool if( aIgnoreCase ) { if( toupper( *aString1 ) < toupper( *aString2 ) ) if( toupper( *str1 ) < toupper( *str2 ) ) return -1; if( toupper( *aString1 ) > toupper( *aString2 ) ) if( toupper( *str1 ) > toupper( *str2 ) ) return 1; if( ( *aString1 == 0 ) && ( *aString2 == 0 ) ) if( ( *str1 == 0 ) && ( *str2 == 0 ) ) return 0; } else { if( *aString1 < *aString2 ) if( *str1 < *str2 ) return -1; if( *aString1 > *aString2 ) if( *str1 > *str2 ) return 1; if( ( *aString1 == 0 ) && ( *aString2 == 0 ) ) if( ( str1 == aString1.end() ) && ( str2 == aString2.end() ) ) return 0; } aString1++; aString2++; str1++; str2++; } return 0; Loading eeschema/class_library.cpp +10 −10 Original line number Diff line number Diff line Loading @@ -44,18 +44,18 @@ #include <wx/tokenzr.h> #include <wx/regex.h> static const wxChar* duplicate_name_msg = static const wxString duplicate_name_msg = _( "Library <%s> has duplicate entry name <%s>.\n\ This may cause some unexpected behavior when loading components into a schematic." ); bool operator==( const CMP_LIBRARY& aLibrary, const wxChar* aName ) bool operator==( const CMP_LIBRARY& aLibrary, const wxString& aName ) { return aLibrary.GetName().CmpNoCase( aName ) == 0; } bool operator!=( const CMP_LIBRARY& aLibrary, const wxChar* aName ) bool operator!=( const CMP_LIBRARY& aLibrary, const wxString& aName ) { return !( aLibrary == aName ); } Loading Loading @@ -224,10 +224,10 @@ bool CMP_LIBRARY::Conflicts( LIB_COMPONENT* aComponent ) } LIB_ALIAS* CMP_LIBRARY::FindEntry( const wxChar* aName ) LIB_ALIAS* CMP_LIBRARY::FindEntry( const wxString& aName ) { LIB_ALIAS_MAP::iterator it = aliases.find( wxString( aName ) ); LIB_ALIAS_MAP::iterator it = aliases.find( aName ); if( it != aliases.end() ) return (*it).second; Loading @@ -245,7 +245,7 @@ LIB_ALIAS* CMP_LIBRARY::GetFirstEntry() } LIB_COMPONENT* CMP_LIBRARY::FindComponent( const wxChar* aName ) LIB_COMPONENT* CMP_LIBRARY::FindComponent( const wxString& aName ) { LIB_COMPONENT* component = NULL; LIB_ALIAS* entry = FindEntry( aName ); Loading Loading @@ -392,12 +392,12 @@ LIB_COMPONENT* CMP_LIBRARY::ReplaceComponent( LIB_COMPONENT* aOldComponent, } LIB_ALIAS* CMP_LIBRARY::GetNextEntry( const wxChar* aName ) LIB_ALIAS* CMP_LIBRARY::GetNextEntry( const wxString& aName ) { if( aliases.empty() ) return NULL; LIB_ALIAS_MAP::iterator it = aliases.find( wxString( aName ) ); LIB_ALIAS_MAP::iterator it = aliases.find( aName ); it++; Loading @@ -408,12 +408,12 @@ LIB_ALIAS* CMP_LIBRARY::GetNextEntry( const wxChar* aName ) } LIB_ALIAS* CMP_LIBRARY::GetPreviousEntry( const wxChar* aName ) LIB_ALIAS* CMP_LIBRARY::GetPreviousEntry( const wxString& aName ) { if( aliases.empty() ) return NULL; LIB_ALIAS_MAP::iterator it = aliases.find( wxString( aName ) ); LIB_ALIAS_MAP::iterator it = aliases.find( aName ); if( it == aliases.begin() ) it = aliases.end(); Loading Loading
common/edaappl.cpp +1 −6 Original line number Diff line number Diff line Loading @@ -57,11 +57,6 @@ static const wxChar* CommonConfigPath = wxT( "kicad_common" ); #ifdef __UNIX__ # define TMP_FILE "/tmp/kicad.tmp" #endif // some key strings used to store parameters in config static const wxChar backgroundColorKey[] = wxT( "BackgroundColor" ); static const wxChar showPageLimitsKey[] = wxT( "ShowPageLimits" ); Loading Loading @@ -90,7 +85,7 @@ struct LANGUAGE_DESCR BITMAP_DEF m_Lang_Icon; /// Labels used in menus const wxChar* m_Lang_Label; wxString m_Lang_Label; /// Set to true if the m_Lang_Label must not be translated bool m_DoNotTranslate; Loading
common/gr_basic.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -1451,12 +1451,12 @@ EDA_COLOR_T ColorMix( EDA_COLOR_T aColor1, EDA_COLOR_T aColor2 ) } EDA_COLOR_T ColorByName( const wxChar *aName ) EDA_COLOR_T ColorByName( const wxString& aName ) { // look for a match in the palette itself for( EDA_COLOR_T trying = BLACK; trying < NBCOLORS; trying = NextColor(trying) ) { if( 0 == wxStricmp( aName, g_ColorRefs[trying].m_Name ) ) if( 0 == aName.CmpNoCase( g_ColorRefs[trying].m_Name ) ) return trying; } Loading
common/page_layout/class_worksheet_dataitem.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -430,7 +430,7 @@ const wxPoint WORKSHEET_DATAITEM_POLYPOLYGON::GetCornerPositionUi( unsigned aIdx return wxPoint( int(pos.x), int(pos.y) ); } WORKSHEET_DATAITEM_TEXT::WORKSHEET_DATAITEM_TEXT( const wxChar* aTextBase ) : WORKSHEET_DATAITEM_TEXT::WORKSHEET_DATAITEM_TEXT( const wxString& aTextBase ) : WORKSHEET_DATAITEM( WS_TEXT ) { m_TextBase = aTextBase; Loading
common/string.cpp +19 −17 Original line number Diff line number Diff line Loading @@ -211,31 +211,33 @@ wxString DateAndTime() } int StrNumCmp( const wxChar* aString1, const wxChar* aString2, int aLength, bool aIgnoreCase ) int StrNumCmp( const wxString& aString1, const wxString& aString2, int aLength, bool aIgnoreCase ) { int i; int nb1 = 0, nb2 = 0; if( ( aString1 == NULL ) || ( aString2 == NULL ) ) wxString::const_iterator str1 = aString1.begin(), str2 = aString2.begin(); if( ( str1 == aString1.end() ) || ( str2 == aString2.end() ) ) return 0; for( i = 0; i < aLength; i++ ) { if( isdigit( *aString1 ) && isdigit( *aString2 ) ) /* digit found */ if( isdigit( *str1 ) && isdigit( *str2 ) ) /* digit found */ { nb1 = 0; nb2 = 0; while( isdigit( *aString1 ) ) while( isdigit( *str1 ) ) { nb1 = nb1 * 10 + *aString1 - '0'; aString1++; nb1 = nb1 * 10 + (int) *str1 - '0'; str1++; } while( isdigit( *aString2 ) ) while( isdigit( *str2 ) ) { nb2 = nb2 * 10 + *aString2 - '0'; aString2++; nb2 = nb2 * 10 + (int) *str2 - '0'; str2++; } if( nb1 < nb2 ) Loading @@ -247,29 +249,29 @@ int StrNumCmp( const wxChar* aString1, const wxChar* aString2, int aLength, bool if( aIgnoreCase ) { if( toupper( *aString1 ) < toupper( *aString2 ) ) if( toupper( *str1 ) < toupper( *str2 ) ) return -1; if( toupper( *aString1 ) > toupper( *aString2 ) ) if( toupper( *str1 ) > toupper( *str2 ) ) return 1; if( ( *aString1 == 0 ) && ( *aString2 == 0 ) ) if( ( *str1 == 0 ) && ( *str2 == 0 ) ) return 0; } else { if( *aString1 < *aString2 ) if( *str1 < *str2 ) return -1; if( *aString1 > *aString2 ) if( *str1 > *str2 ) return 1; if( ( *aString1 == 0 ) && ( *aString2 == 0 ) ) if( ( str1 == aString1.end() ) && ( str2 == aString2.end() ) ) return 0; } aString1++; aString2++; str1++; str2++; } return 0; Loading
eeschema/class_library.cpp +10 −10 Original line number Diff line number Diff line Loading @@ -44,18 +44,18 @@ #include <wx/tokenzr.h> #include <wx/regex.h> static const wxChar* duplicate_name_msg = static const wxString duplicate_name_msg = _( "Library <%s> has duplicate entry name <%s>.\n\ This may cause some unexpected behavior when loading components into a schematic." ); bool operator==( const CMP_LIBRARY& aLibrary, const wxChar* aName ) bool operator==( const CMP_LIBRARY& aLibrary, const wxString& aName ) { return aLibrary.GetName().CmpNoCase( aName ) == 0; } bool operator!=( const CMP_LIBRARY& aLibrary, const wxChar* aName ) bool operator!=( const CMP_LIBRARY& aLibrary, const wxString& aName ) { return !( aLibrary == aName ); } Loading Loading @@ -224,10 +224,10 @@ bool CMP_LIBRARY::Conflicts( LIB_COMPONENT* aComponent ) } LIB_ALIAS* CMP_LIBRARY::FindEntry( const wxChar* aName ) LIB_ALIAS* CMP_LIBRARY::FindEntry( const wxString& aName ) { LIB_ALIAS_MAP::iterator it = aliases.find( wxString( aName ) ); LIB_ALIAS_MAP::iterator it = aliases.find( aName ); if( it != aliases.end() ) return (*it).second; Loading @@ -245,7 +245,7 @@ LIB_ALIAS* CMP_LIBRARY::GetFirstEntry() } LIB_COMPONENT* CMP_LIBRARY::FindComponent( const wxChar* aName ) LIB_COMPONENT* CMP_LIBRARY::FindComponent( const wxString& aName ) { LIB_COMPONENT* component = NULL; LIB_ALIAS* entry = FindEntry( aName ); Loading Loading @@ -392,12 +392,12 @@ LIB_COMPONENT* CMP_LIBRARY::ReplaceComponent( LIB_COMPONENT* aOldComponent, } LIB_ALIAS* CMP_LIBRARY::GetNextEntry( const wxChar* aName ) LIB_ALIAS* CMP_LIBRARY::GetNextEntry( const wxString& aName ) { if( aliases.empty() ) return NULL; LIB_ALIAS_MAP::iterator it = aliases.find( wxString( aName ) ); LIB_ALIAS_MAP::iterator it = aliases.find( aName ); it++; Loading @@ -408,12 +408,12 @@ LIB_ALIAS* CMP_LIBRARY::GetNextEntry( const wxChar* aName ) } LIB_ALIAS* CMP_LIBRARY::GetPreviousEntry( const wxChar* aName ) LIB_ALIAS* CMP_LIBRARY::GetPreviousEntry( const wxString& aName ) { if( aliases.empty() ) return NULL; LIB_ALIAS_MAP::iterator it = aliases.find( wxString( aName ) ); LIB_ALIAS_MAP::iterator it = aliases.find( aName ); if( it == aliases.begin() ) it = aliases.end(); Loading