Cannot use two layers of temporary in range-for (yet)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6244
This commit is contained in:
parent
33e54f136b
commit
52cb410952
|
@ -619,7 +619,7 @@ void EDA_TEXT::TransformTextShapeToSegmentList( std::vector<wxPoint>& aCornerBuf
|
||||||
|
|
||||||
std::shared_ptr<SHAPE_COMPOUND> EDA_TEXT::GetEffectiveTextShape( ) const
|
std::shared_ptr<SHAPE_COMPOUND> EDA_TEXT::GetEffectiveTextShape( ) const
|
||||||
{
|
{
|
||||||
std::shared_ptr<SHAPE_COMPOUND> shape ( new SHAPE_COMPOUND );
|
std::shared_ptr<SHAPE_COMPOUND> shape = std::make_shared<SHAPE_COMPOUND>();
|
||||||
int penWidth = GetEffectiveTextPenWidth();
|
int penWidth = GetEffectiveTextPenWidth();
|
||||||
std::vector<wxPoint> pts;
|
std::vector<wxPoint> pts;
|
||||||
TransformTextShapeToSegmentList( pts );
|
TransformTextShapeToSegmentList( pts );
|
||||||
|
|
|
@ -375,7 +375,9 @@ std::vector<SHAPE*> DIMENSION::MakeEffectiveShapes() const
|
||||||
{
|
{
|
||||||
std::vector<SHAPE*> effectiveShapes;
|
std::vector<SHAPE*> effectiveShapes;
|
||||||
|
|
||||||
for( SHAPE* shape : Text().GetEffectiveTextShape()->Shapes() )
|
std::shared_ptr<SHAPE_COMPOUND> ets = Text().GetEffectiveTextShape();
|
||||||
|
|
||||||
|
for( const SHAPE* shape : ets->Shapes() )
|
||||||
effectiveShapes.emplace_back( shape->Clone() );
|
effectiveShapes.emplace_back( shape->Clone() );
|
||||||
|
|
||||||
for( const std::shared_ptr<SHAPE>& shape : GetShapes() )
|
for( const std::shared_ptr<SHAPE>& shape : GetShapes() )
|
||||||
|
|
Loading…
Reference in New Issue