mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-13 17:53:11 +02:00
Replace alg::delete and alg::delete_if with std c++20
This commit is contained in:
parent
06d5503db1
commit
4aa2047f45
@ -43,6 +43,7 @@
|
||||
#include <wx/checkbox.h>
|
||||
|
||||
#include <../3d_rendering/opengl/render_3d_opengl.h>
|
||||
#include <algorithm>
|
||||
|
||||
/// Render Row abbreviation to reduce source width.
|
||||
#define RR APPEARANCE_CONTROLS_3D::APPEARANCE_SETTING_3D
|
||||
@ -872,7 +873,7 @@ void APPEARANCE_CONTROLS_3D::onLayerPresetChanged( wxCommandEvent& aEvent )
|
||||
if( m_cbLayerPresets->FindString( name ) != wxNOT_FOUND )
|
||||
m_cbLayerPresets->Delete( m_cbLayerPresets->FindString( name ) );
|
||||
|
||||
alg::delete_if( cfg->m_LayerPresets,
|
||||
std::erase_if( cfg->m_LayerPresets,
|
||||
[name]( const LAYER_PRESET_3D& preset )
|
||||
{
|
||||
return preset.name == name;
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
#include <core/kicad_algo.h>
|
||||
#include <json_common.h>
|
||||
#include <algorithm>
|
||||
|
||||
#include <database/database_lib_settings.h>
|
||||
#include <settings/parameters.h>
|
||||
@ -91,7 +92,7 @@ DATABASE_LIB_SETTINGS::DATABASE_LIB_SETTINGS( const std::string& aFilename ) :
|
||||
|
||||
// Sanitize library display names; currently only `/` is removed because we
|
||||
// use it as a separator and allow it in symbol names.
|
||||
alg::delete_matching( table.name, '/' );
|
||||
std::erase( table.name, '/' );
|
||||
|
||||
if( entry.contains( "properties" ) && entry["properties"].is_object() )
|
||||
{
|
||||
|
@ -38,6 +38,8 @@
|
||||
#include <notifications_manager.h>
|
||||
#include <widgets/kistatusbar.h>
|
||||
#include <widgets/ui_common.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <json_common.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
@ -377,7 +379,7 @@ void NOTIFICATIONS_MANAGER::onListWindowClosed( wxCloseEvent& aEvent )
|
||||
{
|
||||
NOTIFICATIONS_LIST* evtWindow = dynamic_cast<NOTIFICATIONS_LIST*>( aEvent.GetEventObject() );
|
||||
|
||||
alg::delete_if( m_shownDialogs, [&]( NOTIFICATIONS_LIST* dialog )
|
||||
std::erase_if( m_shownDialogs, [&]( NOTIFICATIONS_LIST* dialog )
|
||||
{
|
||||
return dialog == evtWindow;
|
||||
} );
|
||||
@ -426,7 +428,7 @@ void NOTIFICATIONS_MANAGER::RegisterStatusBar( KISTATUSBAR* aStatusBar )
|
||||
|
||||
void NOTIFICATIONS_MANAGER::UnregisterStatusBar( KISTATUSBAR* aStatusBar )
|
||||
{
|
||||
alg::delete_if( m_statusBars, [&]( KISTATUSBAR* statusBar )
|
||||
std::erase_if( m_statusBars, [&]( KISTATUSBAR* statusBar )
|
||||
{
|
||||
return statusBar == aStatusBar;
|
||||
} );
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <wx/stdpaths.h> // required on Mac
|
||||
#include <kiplatform/environment.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <pgm_base.h>
|
||||
#include <confirm.h>
|
||||
#include <core/kicad_algo.h>
|
||||
@ -249,10 +250,10 @@ void PROJECT::UnpinLibrary( const wxString& aLibrary, enum LIB_TYPE_T aLibType )
|
||||
return;
|
||||
}
|
||||
|
||||
alg::delete_matching( *pinnedLibsFile, aLibrary );
|
||||
std::erase( *pinnedLibsFile, aLibrary );
|
||||
Pgm().GetSettingsManager().SaveProject();
|
||||
|
||||
alg::delete_matching( *pinnedLibsCfg, aLibrary );
|
||||
std::erase( *pinnedLibsCfg, aLibrary );
|
||||
cfg->SaveToFile( Pgm().GetSettingsManager().GetPathForSettingsFile( cfg ) );
|
||||
}
|
||||
|
||||
|
@ -38,6 +38,8 @@
|
||||
#include <macros.h>
|
||||
#include <pgm_base.h>
|
||||
#include <paths.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <project.h>
|
||||
#include <project/project_archiver.h>
|
||||
#include <project/project_file.h>
|
||||
@ -745,7 +747,7 @@ bool SETTINGS_MANAGER::GetPreviousVersionPaths( std::vector<wxString>* aPaths )
|
||||
}
|
||||
}
|
||||
|
||||
alg::delete_if( *aPaths, []( const wxString& aPath ) -> bool
|
||||
std::erase_if( *aPaths, []( const wxString& aPath ) -> bool
|
||||
{
|
||||
wxFileName fulldir = wxFileName::DirName( aPath );
|
||||
const wxArrayString& dirs = fulldir.GetDirs();
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include <gal/definitions.h>
|
||||
#include <gal/graphics_abstraction_layer.h>
|
||||
#include <gal/painter.h>
|
||||
#include <algorithm>
|
||||
|
||||
#include <core/profile.h>
|
||||
|
||||
@ -369,7 +370,7 @@ void VIEW::Remove( VIEW_ITEM* aItem )
|
||||
if( s_gcCounter > 4096 )
|
||||
{
|
||||
// Perform defragmentation
|
||||
alg::delete_if( *m_allItems,
|
||||
std::erase_if( *m_allItems,
|
||||
[]( VIEW_ITEM* it )
|
||||
{
|
||||
return it == nullptr;
|
||||
|
@ -33,6 +33,7 @@
|
||||
|
||||
#include <set>
|
||||
#include <core/kicad_algo.h>
|
||||
#include <algorithm>
|
||||
#include <view/view_group.h>
|
||||
#include <view/view.h>
|
||||
#include <view/view_item.h>
|
||||
@ -69,7 +70,7 @@ void VIEW_GROUP::Add( VIEW_ITEM* aItem )
|
||||
|
||||
void VIEW_GROUP::Remove( VIEW_ITEM* aItem )
|
||||
{
|
||||
alg::delete_matching( m_groupItems, aItem );
|
||||
std::erase( m_groupItems, aItem );
|
||||
}
|
||||
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <widgets/lib_tree.h>
|
||||
#include <widgets/bitmap_button.h>
|
||||
#include <core/kicad_algo.h>
|
||||
#include <algorithm>
|
||||
#include <macros.h>
|
||||
#include <bitmaps.h>
|
||||
#include <dialogs/eda_reorderable_list_dialog.h>
|
||||
@ -430,7 +431,7 @@ void LIB_TREE::updateRecentSearchMenu()
|
||||
if( !newEntry.IsEmpty() )
|
||||
{
|
||||
if( alg::contains( recents, newEntry ) )
|
||||
alg::delete_matching( recents, newEntry );
|
||||
std::erase( recents, newEntry );
|
||||
|
||||
if( recents.size() >= RECENT_SEARCHES_MAX )
|
||||
recents.pop_back();
|
||||
|
@ -959,7 +959,7 @@ std::set<std::pair<SCH_SHEET_PATH, SCH_ITEM*>> CONNECTION_GRAPH::ExtractAffected
|
||||
}
|
||||
}
|
||||
|
||||
alg::delete_matching( m_items, aItem );
|
||||
std::erase( m_items, aItem );
|
||||
};
|
||||
|
||||
for( SCH_ITEM* item : aItems )
|
||||
@ -987,7 +987,7 @@ std::set<std::pair<SCH_SHEET_PATH, SCH_ITEM*>> CONNECTION_GRAPH::ExtractAffected
|
||||
removeSubgraphs( subgraphs );
|
||||
|
||||
for( const auto& [path, item] : retvals )
|
||||
alg::delete_matching( m_items, item );
|
||||
std::erase( m_items, item );
|
||||
|
||||
return retvals;
|
||||
}
|
||||
@ -1006,7 +1006,7 @@ void CONNECTION_GRAPH::RemoveItem( SCH_ITEM* aItem )
|
||||
subgraph = subgraph->m_absorbed_by;
|
||||
|
||||
subgraph->RemoveItem( aItem );
|
||||
alg::delete_matching( m_items, aItem );
|
||||
std::erase( m_items, aItem );
|
||||
m_item_to_subgraph_map.erase( it );
|
||||
}
|
||||
|
||||
@ -1892,7 +1892,7 @@ void CONNECTION_GRAPH::processSubGraphs()
|
||||
wxS( "%ld (%s) is weakly driven and not unique. Changing to %s." ),
|
||||
subgraph->m_code, name, new_name );
|
||||
|
||||
alg::delete_matching( *vec, subgraph );
|
||||
std::erase( *vec, subgraph );
|
||||
|
||||
m_net_name_to_subgraphs_map[new_name].emplace_back( subgraph );
|
||||
|
||||
@ -2216,7 +2216,7 @@ void CONNECTION_GRAPH::buildConnectionGraph( std::function<void( SCH_ITEM* )>* a
|
||||
proc_sub_graph.Show();
|
||||
|
||||
// Absorbed subgraphs should no longer be considered
|
||||
alg::delete_if( m_driver_subgraphs, [&]( const CONNECTION_SUBGRAPH* candidate ) -> bool
|
||||
std::erase_if( m_driver_subgraphs, [&]( const CONNECTION_SUBGRAPH* candidate ) -> bool
|
||||
{
|
||||
return candidate->m_absorbed;
|
||||
} );
|
||||
@ -3083,7 +3083,7 @@ void CONNECTION_GRAPH::recacheSubgraphName( CONNECTION_SUBGRAPH* aSubgraph,
|
||||
if( it != m_net_name_to_subgraphs_map.end() )
|
||||
{
|
||||
std::vector<CONNECTION_SUBGRAPH*>& vec = it->second;
|
||||
alg::delete_matching( vec, aSubgraph );
|
||||
std::erase( vec, aSubgraph );
|
||||
}
|
||||
|
||||
wxLogTrace( ConnTrace, wxS( "recacheSubgraphName: %s => %s" ), aOldName,
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include <sch_screen.h>
|
||||
#include <sch_textbox.h>
|
||||
#include <string_utils.h>
|
||||
#include <algorithm>
|
||||
#include <ki_exception.h>
|
||||
|
||||
#include <dialogs/html_message_box.h>
|
||||
@ -709,7 +710,7 @@ SCH_SHEET_LIST NETLIST_EXPORTER_SPICE::BuildSheetList( unsigned aNetlistOptions
|
||||
else
|
||||
sheets = m_schematic->Hierarchy();
|
||||
|
||||
alg::delete_if( sheets,
|
||||
std::erase_if( sheets,
|
||||
[&]( const SCH_SHEET_PATH& sheet )
|
||||
{
|
||||
return sheet.GetExcludedFromSim();
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include <symbol_library.h>
|
||||
#include <settings/settings_manager.h>
|
||||
#include <project/project_file.h>
|
||||
#include <core/kicad_algo.h>
|
||||
#include <symbol_library_common.h>
|
||||
#include <confirm.h>
|
||||
#include <sch_tool_utils.h>
|
||||
@ -38,6 +37,7 @@
|
||||
#include <symbol_viewer_frame.h>
|
||||
#include <symbol_tree_model_adapter.h>
|
||||
#include <symbol_editor/symbol_editor_settings.h>
|
||||
#include <algorithm>
|
||||
#include <sch_symbol.h>
|
||||
#include <sch_commit.h>
|
||||
#include <sch_edit_frame.h>
|
||||
@ -82,7 +82,7 @@ PICKED_SYMBOL SCH_BASE_FRAME::PickSymbolFromLibrary( const SYMBOL_LIBRARY_FILTER
|
||||
|
||||
if( sel.LibId.IsValid() )
|
||||
{
|
||||
alg::delete_if( aHistoryList, [&sel]( PICKED_SYMBOL const& i )
|
||||
std::erase_if( aHistoryList, [&sel]( PICKED_SYMBOL const& i )
|
||||
{
|
||||
return i.LibId == sel.LibId;
|
||||
} );
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include <general.h>
|
||||
#include <string_utils.h>
|
||||
#include "scintilla_tricks.h"
|
||||
#include <algorithm>
|
||||
|
||||
class SCH_EDIT_FRAME;
|
||||
class SCH_TEXT;
|
||||
@ -424,7 +425,7 @@ inline void SetFieldValue( std::vector<SCH_FIELD>& aFields, const wxString& aFie
|
||||
{
|
||||
if( aValue == "" )
|
||||
{
|
||||
alg::delete_if( aFields, [&]( const SCH_FIELD& field )
|
||||
std::erase_if( aFields, [&]( const SCH_FIELD& field )
|
||||
{
|
||||
return field.GetName() == aFieldName;
|
||||
} );
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include <schematic.h>
|
||||
#include <project.h>
|
||||
#include <richio.h>
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
void LTSPICE_SCHEMATIC::Load( SCHEMATIC* aSchematic, SCH_SHEET* aRootSheet,
|
||||
@ -81,7 +82,7 @@ void LTSPICE_SCHEMATIC::Load( SCHEMATIC* aSchematic, SCH_SHEET* aRootSheet,
|
||||
|
||||
std::vector<LTSPICE_FILE> newSubSchematicElements = GetSchematicElements( buffer );
|
||||
|
||||
alg::delete_if( newSubSchematicElements,
|
||||
std::erase_if( newSubSchematicElements,
|
||||
[&mapOfAscFiles]( const LTSPICE_FILE& ii )
|
||||
{
|
||||
return mapOfAscFiles[ii.ElementName].IsEmpty();
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include <project/net_settings.h>
|
||||
#include <core/kicad_algo.h>
|
||||
#include <core/mirror.h>
|
||||
#include <algorithm>
|
||||
#include <trigo.h>
|
||||
#include <sch_label.h>
|
||||
#include <sch_rule_area.h>
|
||||
@ -667,7 +668,7 @@ void SCH_LABEL_BASE::GetIntersheetRefs( const SCH_SHEET_PATH* aPath,
|
||||
if( !Schematic()->Settings().m_IntersheetRefsListOwnPage )
|
||||
{
|
||||
int currentPage = Schematic()->CurrentSheet().GetVirtualPageNumber();
|
||||
alg::delete_matching( pageListCopy, currentPage );
|
||||
std::erase( pageListCopy, currentPage );
|
||||
|
||||
if( pageListCopy.empty() )
|
||||
return;
|
||||
@ -1983,7 +1984,7 @@ bool SCH_GLOBALLABEL::ResolveTextVar( const SCH_SHEET_PATH* aPath, wxString* tok
|
||||
if( !settings.m_IntersheetRefsListOwnPage )
|
||||
{
|
||||
int currentPage = schematic->CurrentSheet().GetVirtualPageNumber();
|
||||
alg::delete_matching( pageListCopy, currentPage );
|
||||
std::erase( pageListCopy, currentPage );
|
||||
}
|
||||
|
||||
std::map<int, wxString> sheetPages = schematic->GetVirtualPageToSheetPagesMap();
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
#include <sch_tablecell.h>
|
||||
#include <sch_item.h>
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
class SCH_TABLE : public SCH_ITEM
|
||||
@ -180,7 +181,7 @@ public:
|
||||
|
||||
void DeleteMarkedCells()
|
||||
{
|
||||
alg::delete_if( m_cells,
|
||||
std::erase_if( m_cells,
|
||||
[]( SCH_TABLECELL* cell )
|
||||
{
|
||||
return ( cell->GetFlags() & STRUCT_DELETED ) > 0;
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <eeschema_settings.h>
|
||||
#include <widgets/panel_symbol_chooser.h>
|
||||
#include <symbol_chooser_frame.h>
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
static std::vector<PICKED_SYMBOL> s_SymbolHistoryList;
|
||||
@ -36,7 +37,7 @@ static unsigned s_SymbolHistoryMaxCount = 8;
|
||||
static void AddSymbolToHistory( const PICKED_SYMBOL& aSymbol )
|
||||
{
|
||||
// Remove duplicates
|
||||
alg::delete_if( s_SymbolHistoryList,
|
||||
std::erase_if( s_SymbolHistoryList,
|
||||
[&]( const PICKED_SYMBOL& candidate ) -> bool
|
||||
{
|
||||
return candidate.LibId == aSymbol.LibId
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include <sch_actions.h>
|
||||
#include <sch_tool_utils.h>
|
||||
#include <increment.h>
|
||||
#include <algorithm>
|
||||
#include <string_utils.h>
|
||||
#include <sch_bitmap.h>
|
||||
#include <sch_bus_entry.h>
|
||||
@ -2799,7 +2800,7 @@ int SCH_EDIT_TOOL::ChangeTextType( const TOOL_EVENT& aEvent )
|
||||
|
||||
// A SCH_GLOBALLABEL has a specific field for intersheet references that has
|
||||
// no meaning for other labels
|
||||
alg::delete_if( new_label->GetFields(),
|
||||
std::erase_if( new_label->GetFields(),
|
||||
[&]( SCH_FIELD& field )
|
||||
{
|
||||
return field.GetId() == FIELD_T::INTERSHEET_REFS
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include <symbol_editor_settings.h>
|
||||
#include <symbol_library.h> // For SYMBOL_LIBRARY_FILTER
|
||||
#include <symbol_lib_table.h>
|
||||
#include <algorithm>
|
||||
#include <wx/button.h>
|
||||
#include <wx/clipbrd.h>
|
||||
#include <wx/panel.h>
|
||||
@ -667,7 +668,7 @@ void PANEL_SYMBOL_CHOOSER::onFootprintSelected( wxCommandEvent& aEvent )
|
||||
{
|
||||
m_fp_override = aEvent.GetString();
|
||||
|
||||
alg::delete_if( m_field_edits, []( std::pair<FIELD_T, wxString> const& i )
|
||||
std::erase_if( m_field_edits, []( std::pair<FIELD_T, wxString> const& i )
|
||||
{
|
||||
return i.first == FIELD_T::FOOTPRINT;
|
||||
} );
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
#include <vector>
|
||||
#include <core/kicad_algo.h>
|
||||
#include <algorithm>
|
||||
#include <eda_item.h> // SEARCH_RESULT
|
||||
|
||||
|
||||
@ -119,7 +120,7 @@ public:
|
||||
*/
|
||||
void Remove( const EDA_ITEM* aItem )
|
||||
{
|
||||
alg::delete_if( m_list, [&aItem]( const EDA_ITEM* aCandidate )
|
||||
std::erase_if( m_list, [&aItem]( const EDA_ITEM* aCandidate )
|
||||
{
|
||||
return aCandidate == aItem;
|
||||
} );
|
||||
|
@ -154,28 +154,6 @@ bool within_wrapped_range( T __val, T __minval, T __maxval, T __wrap )
|
||||
return __val >= __minval || __val <= __maxval;
|
||||
}
|
||||
|
||||
/**
|
||||
* Covers for the horrifically named std::remove and std::remove_if (neither of which remove
|
||||
* anything).
|
||||
*/
|
||||
/**
|
||||
* @brief Deletes all values from \a __c which match \a __value.
|
||||
*/
|
||||
template <class _Container, typename _Value>
|
||||
void delete_matching( _Container& __c, _Value __value )
|
||||
{
|
||||
__c.erase( std::remove( __c.begin(), __c.end(), __value ), __c.end() );
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Deletes all values from \a __c for which \a __f returns true.
|
||||
*/
|
||||
template <class _Container, class _Function>
|
||||
void delete_if( _Container& __c, _Function&& __f )
|
||||
{
|
||||
__c.erase( std::remove_if( __c.begin(), __c.end(), std::forward<_Function>( __f ) ), __c.end() );
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Deletes all duplicate values from \a __c.
|
||||
*/
|
||||
|
@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#include <iterator>
|
||||
#include <algorithm>
|
||||
|
||||
#include <wx/log.h>
|
||||
|
||||
@ -1323,24 +1324,24 @@ void BOARD::Remove( BOARD_ITEM* aBoardItem, REMOVE_MODE aRemoveMode )
|
||||
}
|
||||
|
||||
case PCB_MARKER_T:
|
||||
alg::delete_matching( m_markers, aBoardItem );
|
||||
std::erase( m_markers, aBoardItem );
|
||||
break;
|
||||
|
||||
case PCB_GROUP_T:
|
||||
alg::delete_matching( m_groups, aBoardItem );
|
||||
std::erase( m_groups, aBoardItem );
|
||||
break;
|
||||
|
||||
case PCB_ZONE_T:
|
||||
alg::delete_matching( m_zones, aBoardItem );
|
||||
std::erase( m_zones, aBoardItem );
|
||||
break;
|
||||
|
||||
case PCB_GENERATOR_T:
|
||||
alg::delete_matching( m_generators, aBoardItem );
|
||||
std::erase( m_generators, aBoardItem );
|
||||
break;
|
||||
|
||||
case PCB_FOOTPRINT_T:
|
||||
{
|
||||
alg::delete_matching( m_footprints, aBoardItem );
|
||||
std::erase( m_footprints, aBoardItem );
|
||||
FOOTPRINT* footprint = static_cast<FOOTPRINT*>( aBoardItem );
|
||||
|
||||
footprint->RunOnChildren( [&]( BOARD_ITEM* aChild )
|
||||
@ -1355,7 +1356,7 @@ void BOARD::Remove( BOARD_ITEM* aBoardItem, REMOVE_MODE aRemoveMode )
|
||||
case PCB_TRACE_T:
|
||||
case PCB_ARC_T:
|
||||
case PCB_VIA_T:
|
||||
alg::delete_matching( m_tracks, aBoardItem );
|
||||
std::erase( m_tracks, aBoardItem );
|
||||
break;
|
||||
|
||||
case PCB_DIM_ALIGNED_T:
|
||||
@ -1371,7 +1372,7 @@ void BOARD::Remove( BOARD_ITEM* aBoardItem, REMOVE_MODE aRemoveMode )
|
||||
case PCB_TABLE_T:
|
||||
case PCB_TARGET_T:
|
||||
{
|
||||
alg::delete_matching( m_drawings, aBoardItem );
|
||||
std::erase( m_drawings, aBoardItem );
|
||||
|
||||
if( aBoardItem->Type() == PCB_TABLE_T )
|
||||
{
|
||||
|
@ -223,13 +223,13 @@ FABMASTER::section_type FABMASTER::detectType( size_t aOffset )
|
||||
|
||||
/// We strip the underscores from all column names as some export variants use them and
|
||||
// some do not
|
||||
alg::delete_if( row1, []( char c ){ return c == '_'; } );
|
||||
alg::delete_if( row2, []( char c ){ return c == '_'; } );
|
||||
std::erase_if( row1, []( char c ){ return c == '_'; } );
|
||||
std::erase_if( row2, []( char c ){ return c == '_'; } );
|
||||
|
||||
if( row.size() > 3 )
|
||||
{
|
||||
row3 = row[3];
|
||||
alg::delete_if( row3, []( char c ){ return c == '_'; } );
|
||||
std::erase_if( row3, []( char c ){ return c == '_'; } );
|
||||
}
|
||||
|
||||
if( row1 == "REFDES" && row2 == "COMPCLASS" )
|
||||
@ -325,7 +325,7 @@ int FABMASTER::getColFromName( size_t aRow, const std::string& aStr )
|
||||
{
|
||||
/// Some Fabmaster headers include the underscores while others do not
|
||||
/// so we strip them uniformly before comparing
|
||||
alg::delete_if( header[i], []( const char c ) { return c == '_'; } );
|
||||
std::erase_if( header[i], []( const char c ) { return c == '_'; } );
|
||||
|
||||
if( header[i] == aStr )
|
||||
return i;
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <pcb_tablecell.h>
|
||||
#include <board_item.h>
|
||||
#include <board_item_container.h>
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
class PCB_TABLE : public BOARD_ITEM_CONTAINER
|
||||
@ -179,7 +180,7 @@ public:
|
||||
|
||||
void DeleteMarkedCells()
|
||||
{
|
||||
alg::delete_if( m_cells,
|
||||
std::erase_if( m_cells,
|
||||
[]( PCB_TABLECELL* cell )
|
||||
{
|
||||
return ( cell->GetFlags() & STRUCT_DELETED ) > 0;
|
||||
|
@ -24,6 +24,8 @@
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <geometry/shape_rect.h>
|
||||
|
||||
#include "pns_diff_pair.h"
|
||||
@ -395,7 +397,7 @@ bool DP_GATEWAYS::checkDiagonalAlignment( const VECTOR2I& a, const VECTOR2I& b )
|
||||
|
||||
void DP_GATEWAYS::FilterByOrientation( int aAngleMask, DIRECTION_45 aRefOrientation )
|
||||
{
|
||||
alg::delete_if( m_gateways,
|
||||
std::erase_if( m_gateways,
|
||||
[aAngleMask, aRefOrientation]( const DP_GATEWAY& dp )
|
||||
{
|
||||
DIRECTION_45 orient( dp.AnchorP() - dp.AnchorN() );
|
||||
|
@ -25,6 +25,7 @@
|
||||
#define PCBNEW_ROUTER_PNS_LINK_HOLDER_H_
|
||||
|
||||
#include <core/kicad_algo.h>
|
||||
#include <algorithm>
|
||||
#include "pns_item.h"
|
||||
#include "pns_linked_item.h"
|
||||
|
||||
@ -49,7 +50,7 @@ public:
|
||||
{
|
||||
wxCHECK_MSG( alg::contains( m_links, aLink ), /* void */,
|
||||
"Trying to unlink an item that is not linked" );
|
||||
alg::delete_matching( m_links, aLink );
|
||||
std::erase( m_links, aLink );
|
||||
}
|
||||
|
||||
///< Return the list of links from the owning node that constitute this
|
||||
|
@ -20,6 +20,9 @@
|
||||
"limit_total_size": 104857600,
|
||||
"min_interval": 300
|
||||
},
|
||||
"dialog": {
|
||||
"controls": {}
|
||||
},
|
||||
"do_not_show_again": {
|
||||
"data_collection_prompt": false,
|
||||
"env_var_overwrite_warning": false,
|
||||
@ -39,7 +42,9 @@
|
||||
"useDefaultAuthor": true
|
||||
},
|
||||
"graphics": {
|
||||
"antialiasing_mode": 2,
|
||||
"cairo_antialiasing_mode": 0,
|
||||
"canvas_type": 1,
|
||||
"opengl_antialiasing_mode": 1
|
||||
},
|
||||
"input": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user