performance efficiencies
This commit is contained in:
parent
1c73d3d967
commit
cfa55d958a
|
@ -185,8 +185,8 @@ void BACK_ANNOTATE::getPcbModulesFromString( const std::string& aPayload )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Fields are of the format "(field (name "name") "12345")
|
// Fields are of the format "(field (name "name") "12345")
|
||||||
const auto fieldName = field.second.get_child_optional( "name" );
|
const auto& fieldName = field.second.get_child_optional( "name" );
|
||||||
const auto fieldValue = field.second.back().first;
|
const auto& fieldValue = field.second.back().first;
|
||||||
|
|
||||||
if( !fieldName )
|
if( !fieldName )
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -671,7 +671,8 @@ void SHAPE_POLY_SET::RebuildHolesFromContours()
|
||||||
|
|
||||||
std::function<void( int, int, std::vector<int> )> process;
|
std::function<void( int, int, std::vector<int> )> process;
|
||||||
|
|
||||||
process = [&]( int myId, int parentOutlineId, std::vector<int> path )
|
process =
|
||||||
|
[&]( int myId, int parentOutlineId, const std::vector<int>& path )
|
||||||
{
|
{
|
||||||
std::set<int> relParents = childToParents[myId];
|
std::set<int> relParents = childToParents[myId];
|
||||||
|
|
||||||
|
|
|
@ -493,7 +493,7 @@ bool doConvertOutlineToPolygon( std::vector<PCB_SHAPE*>& aShapeList, SHAPE_POLY_
|
||||||
parents.push_back( jj );
|
parents.push_back( jj );
|
||||||
}
|
}
|
||||||
|
|
||||||
contourToParentIndexesMap[ii] = parents;
|
contourToParentIndexesMap[ii] = std::move( parents );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Next add those that are top-level outlines to the SHAPE_POLY_SET
|
// Next add those that are top-level outlines to the SHAPE_POLY_SET
|
||||||
|
|
Loading…
Reference in New Issue