diff --git a/eeschema/bus-wire-junction.cpp b/eeschema/bus-wire-junction.cpp index c5882810a8..767b78a0e0 100644 --- a/eeschema/bus-wire-junction.cpp +++ b/eeschema/bus-wire-junction.cpp @@ -274,7 +274,7 @@ void SCH_EDIT_FRAME::GetSchematicConnections( std::vector< wxPoint >& aConnectio // We always have some overlapping connection points. Drop duplicates here std::sort( aConnections.begin(), aConnections.end(), - []( wxPoint& a, wxPoint& b ) -> bool + []( const wxPoint& a, const wxPoint& b ) -> bool { return a.x < b.x || (a.x == b.x && a.y < b.y); } ); aConnections.erase( unique( aConnections.begin(), aConnections.end() ), aConnections.end() ); } diff --git a/eeschema/operations_on_items_lists.cpp b/eeschema/operations_on_items_lists.cpp index 938ce6062c..fcb6efa579 100644 --- a/eeschema/operations_on_items_lists.cpp +++ b/eeschema/operations_on_items_lists.cpp @@ -136,7 +136,7 @@ void SCH_EDIT_FRAME::CheckJunctionsInList( PICKED_ITEMS_LIST& aItemsList, bool a // We always have some overlapping connection points. Drop duplicates here std::sort( pts.begin(), pts.end(), - []( wxPoint& a, wxPoint& b ) -> bool + []( const wxPoint& a, const wxPoint& b ) -> bool { return a.x < b.x || (a.x == b.x && a.y < b.y); } ); pts.erase( unique( pts.begin(), pts.end() ), pts.end() );