CADSTAR PCB Archive Importer: Fix warning.

Need to std::erase after std::remove!
This commit is contained in:
Roberto Fernandez Bautista 2020-10-06 13:46:15 +01:00 committed by Jon Evans
parent df590b1109
commit 7a624d8d44
1 changed files with 7 additions and 1 deletions

View File

@ -446,14 +446,20 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadBoardStackup()
//change last copper layer to be B_Cu instead of an inner layer
LAYER_ID cadstarlastElecLayer = mCopperLayers.rbegin()->second;
PCB_LAYER_ID lastElecBrdId =
stackup.GetStackupLayer( lastElectricalLayerIndex )->GetBrdLayerId();
std::remove( layerIDs.begin(), layerIDs.end(), lastElecBrdId );
layerIDs.erase(
std::remove( layerIDs.begin(), layerIDs.end(), lastElecBrdId ), layerIDs.end() );
layerIDs.push_back( PCB_LAYER_ID::B_Cu );
tempKiCadLayer = stackup.GetStackupLayer( lastElectricalLayerIndex );
tempKiCadLayer->SetBrdLayerId( PCB_LAYER_ID::B_Cu );
wxASSERT( mBoard->SetLayerName(
tempKiCadLayer->GetBrdLayerId(), tempKiCadLayer->GetLayerName() ) );
mLayermap.at( cadstarlastElecLayer ) = PCB_LAYER_ID::B_Cu;
//make all layers enabled and visible