Fix a compil issue (in sch_altium_plugin.cpp) and compil warnings.

This commit is contained in:
jean-pierre charras 2023-09-07 08:53:30 +02:00
parent e665cbac20
commit ecd8c7e2cc
3 changed files with 5 additions and 4 deletions

View File

@ -3697,7 +3697,10 @@ void SCH_ALTIUM_PLUGIN::ParseImplementation( const std::map<wxString, wxString>&
wxArrayString fpFilters; wxArrayString fpFilters;
fpFilters.Add( fpLibId.Format() ); fpFilters.Add( fpLibId.Format() );
symbol->SetFPFilters( wxArrayString( 1, wxString::Format( "*%s*", elem.name ) )); wxString txt;
txt.Printf( "*%s*", elem.name );
symbol->SetFPFilters( wxArrayString( 1, &txt ));
LIB_FIELD& footprintField = symbol->GetFootprintField(); LIB_FIELD& footprintField = symbol->GetFootprintField();
footprintField.SetText( fpLibId.Format() ); footprintField.SetText( fpLibId.Format() );
} }

View File

@ -1113,8 +1113,6 @@ int EE_SELECTION_TOOL::UnselectAll( const TOOL_EVENT& aEvent )
if( sheet ) if( sheet )
{ {
int layer = pair.second;
for( SCH_SHEET_PIN* pin : sheet->GetPins() ) for( SCH_SHEET_PIN* pin : sheet->GetPins() )
{ {
EDA_ITEM* item = dynamic_cast<EDA_ITEM*>( pin ); EDA_ITEM* item = dynamic_cast<EDA_ITEM*>( pin );

View File

@ -683,7 +683,7 @@ public:
auto hspace = " "; // minimal space between name and help message auto hspace = " "; // minimal space between name and help message
stream << name_stream.str(); stream << name_stream.str();
std::string_view help_view(argument.m_help); std::string_view help_view(argument.m_help);
while ((pos = argument.m_help.find('\n', prev)) != std::string::npos) { while ((pos = argument.m_help.find('\n', prev)) != (int)std::string::npos) {
auto line = help_view.substr(prev, pos - prev + 1); auto line = help_view.substr(prev, pos - prev + 1);
if (first_line) { if (first_line) {
stream << hspace << line; stream << hspace << line;