diff --git a/eeschema/connection_graph.cpp b/eeschema/connection_graph.cpp index adba1e0e6f..2e4da88c94 100644 --- a/eeschema/connection_graph.cpp +++ b/eeschema/connection_graph.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -974,8 +975,7 @@ void CONNECTION_GRAPH::updateItemConnectivity( const SCH_SHEET_PATH& aSheet, { std::vector connection_vec = it.second; std::sort( connection_vec.begin(), connection_vec.end() ); - connection_vec.erase( std::unique( connection_vec.begin(), connection_vec.end() ), - connection_vec.end() ); + alg::remove_duplicates( connection_vec ); // Pre-scan to see if we have a bus at this location SCH_LINE* busLine = aSheet.LastScreen()->GetBus( it.first );