diff --git a/common/plotters/GERBER_plotter.cpp b/common/plotters/GERBER_plotter.cpp index 2855dce00e..48d6a515de 100644 --- a/common/plotters/GERBER_plotter.cpp +++ b/common/plotters/GERBER_plotter.cpp @@ -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& 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; } diff --git a/pcbnew/board.cpp b/pcbnew/board.cpp index e6941f750b..a0683d03a2 100644 --- a/pcbnew/board.cpp +++ b/pcbnew/board.cpp @@ -2393,7 +2393,7 @@ std::tuple 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 = { diff --git a/pcbnew/pcb_track.cpp b/pcbnew/pcb_track.cpp index d4b85ed8c9..7f1efff1c2 100644 --- a/pcbnew/pcb_track.cpp +++ b/pcbnew/pcb_track.cpp @@ -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 items{ calcItem }; - constexpr PATH_OPTIMISATIONS opts = { - .OptimiseViaLayers = false, .MergeTracks = false, .OptimiseTracesInPads = false, .InferViaInPad = false - }; + std::vector 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 ); }