diff --git a/pcbnew/drc/drc_rtree.h b/pcbnew/drc/drc_rtree.h index ac1c00ec59..4b51812824 100644 --- a/pcbnew/drc/drc_rtree.h +++ b/pcbnew/drc/drc_rtree.h @@ -56,15 +56,15 @@ public: parent( aParent ), shape( aShape ), shapeStorage( nullptr ), - parentShape( aParentShape ) + parentShape( std::move( aParentShape ) ) {}; - ITEM_WITH_SHAPE( BOARD_ITEM *aParent, std::shared_ptr aShape, + ITEM_WITH_SHAPE( BOARD_ITEM *aParent, const std::shared_ptr& aShape, std::shared_ptr aParentShape = nullptr ) : parent( aParent ), shape( aShape.get() ), shapeStorage( aShape ), - parentShape( aParentShape ) + parentShape( std::move( aParentShape ) ) {}; BOARD_ITEM* parent;