Performance.

This commit is contained in:
Jeff Young 2025-06-08 13:37:02 +01:00
parent 8968ff62e3
commit ff0f6c448b
3 changed files with 10 additions and 9 deletions

View File

@ -452,7 +452,7 @@ int GERBER_PLOTTER::GetOrCreateAperture( const VECTOR2I& aSize, int aRadius,
new_tool.m_ApertureAttribute = aApertureAttribute;
new_tool.m_CustomAttribute = aCustomAttribute;
m_apertures.push_back( new_tool );
m_apertures.push_back( std::move( new_tool ) );
return m_apertures.size() - 1;
}
@ -508,7 +508,7 @@ int GERBER_PLOTTER::GetOrCreateAperture( const std::vector<VECTOR2I>& aCorners,
new_tool.m_ApertureAttribute = aApertureAttribute;
new_tool.m_CustomAttribute = aCustomAttribute;
m_apertures.push_back( new_tool );
m_apertures.push_back( std::move( new_tool ) );
return m_apertures.size() - 1;
}

View File

@ -2393,7 +2393,7 @@ std::tuple<int, double, double, double, double> BOARD::GetTrackLength( const PCB
LENGTH_DELAY_CALCULATION_ITEM item = GetLengthCalculation()->GetLengthCalculationItem( boardItem );
if( item.Type() != LENGTH_DELAY_CALCULATION_ITEM::TYPE::UNKNOWN )
items.push_back( item );
items.push_back( std::move( item ) );
}
constexpr PATH_OPTIMISATIONS opts = {

View File

@ -778,13 +778,14 @@ double PCB_TRACK::GetDelay() const
return 0.0;
const LENGTH_DELAY_CALCULATION* calc = board->GetLengthCalculation();
const LENGTH_DELAY_CALCULATION_ITEM calcItem = calc->GetLengthCalculationItem( this );
std::vector<LENGTH_DELAY_CALCULATION_ITEM> items{ calcItem };
constexpr PATH_OPTIMISATIONS opts = {
.OptimiseViaLayers = false, .MergeTracks = false, .OptimiseTracesInPads = false, .InferViaInPad = false
};
std::vector<LENGTH_DELAY_CALCULATION_ITEM> items{ calc->GetLengthCalculationItem( this ) };
constexpr PATH_OPTIMISATIONS opts = { .OptimiseViaLayers = false,
.MergeTracks = false,
.OptimiseTracesInPads = false,
.InferViaInPad = false
};
return calc->CalculateDelay( items, opts );
return (double) calc->CalculateDelay( items, opts );
}