kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #24926
[PATCH 09/16] Replace boost::shared_ptr with std::shared_ptr
This is a simple 1:1 replacement for all cases where shared_ptr is not used
to point at an array (array handling is not in C++11).
---
3d-viewer/3d_mesh_model.h | 4 ++--
common/gal/opengl/opengl_gal.cpp | 2 +-
common/geometry/hetriang.cpp | 34 +++++++++++++++++-----------------
eeschema/class_libentry.h | 7 +++----
eeschema/sch_component.h | 5 ++---
include/gal/cairo/cairo_gal.h | 5 +++--
include/gal/opengl/opengl_gal.h | 4 ++--
include/gal/opengl/vertex_manager.h | 6 +++---
include/painter.h | 2 +-
include/ttl/halfedge/hetriang.h | 9 ++++-----
pcbnew/class_board_connected_item.h | 2 +-
pcbnew/class_netclass.cpp | 6 ++----
pcbnew/class_netclass.h | 5 +++--
pcbnew/dialogs/dialog_design_rules.cpp | 4 +---
pcbnew/drc_stuff.h | 4 ++--
pcbnew/legacy_plugin.cpp | 4 +---
pcbnew/legacy_plugin.h | 4 +++-
pcbnew/pcb_painter.h | 3 ++-
pcbnew/pcb_parser.cpp | 4 +---
pcbnew/ratsnest_data.cpp | 13 ++++++-------
pcbnew/ratsnest_data.h | 4 ++--
pcbnew/router/pns_optimizer.h | 2 +-
pcbnew/specctra.h | 5 +++--
pcbnew/tools/edit_points.h | 9 +++++----
pcbnew/tools/point_editor.cpp | 5 ++---
pcbnew/tools/point_editor.h | 9 +++++----
pcbnew/tools/selection_tool.cpp | 2 +-
27 files changed, 79 insertions(+), 84 deletions(-)
diff --git a/3d-viewer/3d_mesh_model.h b/3d-viewer/3d_mesh_model.h
index 734789f..bc35e43 100644
--- a/3d-viewer/3d_mesh_model.h
+++ b/3d-viewer/3d_mesh_model.h
@@ -31,7 +31,6 @@
#define __3D_MESH_MODEL_H__
#include <memory>
-#include <boost/shared_ptr.hpp>
#include <vector>
#define GLM_FORCE_RADIANS
#include <glm/glm.hpp>
@@ -39,10 +38,11 @@
#include "3d_material.h"
#include "3d_rendering/3d_render_raytracing/shapes3D/cbbox.h"
+
class S3D_MESH;
/** A smart pointer to an S3D_MESH object */
-typedef boost::shared_ptr<S3D_MESH> S3D_MESH_PTR;
+typedef std::shared_ptr<S3D_MESH> S3D_MESH_PTR;
/** A container of smar S3D_MESH object pointers */
typedef std::vector<S3D_MESH_PTR> S3D_MESH_PTRS;
diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp
index ed462b7..77d51a7 100644
--- a/common/gal/opengl/opengl_gal.cpp
+++ b/common/gal/opengl/opengl_gal.cpp
@@ -1034,7 +1034,7 @@ int OPENGL_GAL::BeginGroup()
{
isGrouping = true;
- boost::shared_ptr<VERTEX_ITEM> newItem( new VERTEX_ITEM( *cachedManager ) );
+ std::shared_ptr<VERTEX_ITEM> newItem = std::make_shared<VERTEX_ITEM>( *cachedManager );
int groupNumber = getNewGroupNumber();
groups.insert( std::make_pair( groupNumber, newItem ) );
diff --git a/common/geometry/hetriang.cpp b/common/geometry/hetriang.cpp
index e5cf26c..8383a8e 100644
--- a/common/geometry/hetriang.cpp
+++ b/common/geometry/hetriang.cpp
@@ -46,8 +46,8 @@
#include <fstream>
#include <limits>
#include <boost/foreach.hpp>
-#include <boost/make_shared.hpp>
#include <class_board_connected_item.h>
+#include <memory>
using namespace hed;
@@ -127,22 +127,22 @@ EDGE_PTR TRIANGULATION::InitTwoEnclosingTriangles( NODES_CONTAINER::iterator aFi
double dx = ( xmax - xmin ) / fac;
double dy = ( ymax - ymin ) / fac;
- NODE_PTR n1 = boost::make_shared<NODE>( xmin - dx, ymin - dy );
- NODE_PTR n2 = boost::make_shared<NODE>( xmax + dx, ymin - dy );
- NODE_PTR n3 = boost::make_shared<NODE>( xmax + dx, ymax + dy );
- NODE_PTR n4 = boost::make_shared<NODE>( xmin - dx, ymax + dy );
+ NODE_PTR n1 = std::make_shared<NODE>( xmin - dx, ymin - dy );
+ NODE_PTR n2 = std::make_shared<NODE>( xmax + dx, ymin - dy );
+ NODE_PTR n3 = std::make_shared<NODE>( xmax + dx, ymax + dy );
+ NODE_PTR n4 = std::make_shared<NODE>( xmin - dx, ymax + dy );
// diagonal
- EDGE_PTR e1d = boost::make_shared<EDGE>();
- EDGE_PTR e2d = boost::make_shared<EDGE>();
+ EDGE_PTR e1d = std::make_shared<EDGE>();
+ EDGE_PTR e2d = std::make_shared<EDGE>();
// lower triangle
- EDGE_PTR e11 = boost::make_shared<EDGE>();
- EDGE_PTR e12 = boost::make_shared<EDGE>();
+ EDGE_PTR e11 = std::make_shared<EDGE>();
+ EDGE_PTR e12 = std::make_shared<EDGE>();
// upper triangle
- EDGE_PTR e21 = boost::make_shared<EDGE>();
- EDGE_PTR e22 = boost::make_shared<EDGE>();
+ EDGE_PTR e21 = std::make_shared<EDGE>();
+ EDGE_PTR e22 = std::make_shared<EDGE>();
// lower triangle
e1d->SetSourceNode( n3 );
@@ -453,12 +453,12 @@ EDGE_PTR TRIANGULATION::SplitTriangle( EDGE_PTR& aEdge, const NODE_PTR& aPoint )
EDGE_PTR e3( e2->GetNextEdgeInFace() );
NODE_PTR n3( e3->GetSourceNode() );
- EDGE_PTR e1_n = boost::make_shared<EDGE>();
- EDGE_PTR e11_n = boost::make_shared<EDGE>();
- EDGE_PTR e2_n = boost::make_shared<EDGE>();
- EDGE_PTR e22_n = boost::make_shared<EDGE>();
- EDGE_PTR e3_n = boost::make_shared<EDGE>();
- EDGE_PTR e33_n = boost::make_shared<EDGE>();
+ EDGE_PTR e1_n = std::make_shared<EDGE>();
+ EDGE_PTR e11_n = std::make_shared<EDGE>();
+ EDGE_PTR e2_n = std::make_shared<EDGE>();
+ EDGE_PTR e22_n = std::make_shared<EDGE>();
+ EDGE_PTR e3_n = std::make_shared<EDGE>();
+ EDGE_PTR e33_n = std::make_shared<EDGE>();
e1_n->SetSourceNode( n1 );
e11_n->SetSourceNode( aPoint );
diff --git a/eeschema/class_libentry.h b/eeschema/class_libentry.h
index b81859e..d4ee11b 100644
--- a/eeschema/class_libentry.h
+++ b/eeschema/class_libentry.h
@@ -33,9 +33,8 @@
#include <general.h>
#include <lib_draw_item.h>
#include <lib_field.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
#include <vector>
+#include <memory>
class LINE_READER;
class OUTPUTFORMATTER;
@@ -59,8 +58,8 @@ inline int Cmp_KEEPCASE( const wxString& aString1, const wxString& aString2 )
typedef std::vector<LIB_ALIAS*> LIB_ALIASES;
-typedef boost::shared_ptr<LIB_PART> PART_SPTR; ///< shared pointer to LIB_PART
-typedef boost::weak_ptr<LIB_PART> PART_REF; ///< weak pointer to LIB_PART
+typedef std::shared_ptr<LIB_PART> PART_SPTR; ///< shared pointer to LIB_PART
+typedef std::weak_ptr<LIB_PART> PART_REF; ///< weak pointer to LIB_PART
/* values for member .m_options */
diff --git a/eeschema/sch_component.h b/eeschema/sch_component.h
index 7d64546..5094afc 100644
--- a/eeschema/sch_component.h
+++ b/eeschema/sch_component.h
@@ -36,7 +36,6 @@
#include <sch_field.h>
#include <transform.h>
#include <general.h>
-#include <boost/weak_ptr.hpp>
#include <vector>
#include <lib_draw_item.h>
@@ -51,9 +50,9 @@ class SCH_COLLECTOR;
/// A container for several SCH_FIELD items
-typedef std::vector<SCH_FIELD> SCH_FIELDS;
+typedef std::vector<SCH_FIELD> SCH_FIELDS;
-typedef boost::weak_ptr<LIB_PART> PART_REF;
+typedef std::weak_ptr<LIB_PART> PART_REF;
/**
diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h
index bc378d4..c0d42f7 100644
--- a/include/gal/cairo/cairo_gal.h
+++ b/include/gal/cairo/cairo_gal.h
@@ -33,9 +33,10 @@
#include <cairo.h>
#include <gal/graphics_abstraction_layer.h>
-#include <boost/smart_ptr/shared_ptr.hpp>
#include <wx/dcbuffer.h>
+#include <memory>
+
#if defined(__WXMSW__)
#define SCREEN_DEPTH 24
#else
@@ -274,7 +275,7 @@ private:
typedef GAL super;
// Compositing variables
- boost::shared_ptr<CAIRO_COMPOSITOR> compositor; ///< Object for layers compositing
+ std::shared_ptr<CAIRO_COMPOSITOR> compositor; ///< Object for layers compositing
unsigned int mainBuffer; ///< Handle to the main buffer
unsigned int overlayBuffer; ///< Handle to the overlay buffer
RENDER_TARGET currentTarget; ///< Current rendering target
diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h
index 508e13a..d371a01 100644
--- a/include/gal/opengl/opengl_gal.h
+++ b/include/gal/opengl/opengl_gal.h
@@ -41,8 +41,8 @@
#include <wx/glcanvas.h>
#include <map>
-#include <boost/smart_ptr/shared_ptr.hpp>
#include <boost/smart_ptr/shared_array.hpp>
+#include <memory>
#ifndef CALLBACK
#define CALLBACK
@@ -281,7 +281,7 @@ private:
static GLuint fontTexture; ///< Bitmap font texture handle (shared)
// Vertex buffer objects related fields
- typedef std::map< unsigned int, boost::shared_ptr<VERTEX_ITEM> > GROUPS_MAP;
+ typedef std::map< unsigned int, std::shared_ptr<VERTEX_ITEM> > GROUPS_MAP;
GROUPS_MAP groups; ///< Stores informations about VBO objects (groups)
unsigned int groupCounter; ///< Counter used for generating keys for groups
VERTEX_MANAGER* currentManager; ///< Currently used VERTEX_MANAGER (for storing VERTEX_ITEMs)
diff --git a/include/gal/opengl/vertex_manager.h b/include/gal/opengl/vertex_manager.h
index f2d4fe5..09c089b 100644
--- a/include/gal/opengl/vertex_manager.h
+++ b/include/gal/opengl/vertex_manager.h
@@ -37,7 +37,7 @@
#include <gal/opengl/vertex_common.h>
#include <gal/color4d.h>
#include <stack>
-#include <boost/smart_ptr/shared_ptr.hpp>
+#include <memory>
#include <wx/log.h>
namespace KIGFX
@@ -349,9 +349,9 @@ protected:
void putVertex( VERTEX& aTarget, GLfloat aX, GLfloat aY, GLfloat aZ ) const;
/// Container for vertices, may be cached or noncached
- boost::shared_ptr<VERTEX_CONTAINER> m_container;
+ std::shared_ptr<VERTEX_CONTAINER> m_container;
/// GPU manager for data transfers and drawing operations
- boost::shared_ptr<GPU_MANAGER> m_gpu;
+ std::shared_ptr<GPU_MANAGER> m_gpu;
/// State machine variables
/// True in case there is no need to transform vertices
diff --git a/include/painter.h b/include/painter.h
index 727533c..cf586fa 100644
--- a/include/painter.h
+++ b/include/painter.h
@@ -33,7 +33,7 @@
#include <gal/color4d.h>
#include <colors.h>
#include <worksheet_shape_builder.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
class EDA_ITEM;
class COLORS_DESIGN_SETTINGS;
diff --git a/include/ttl/halfedge/hetriang.h b/include/ttl/halfedge/hetriang.h
index 1642e92..c29dfd2 100644
--- a/include/ttl/halfedge/hetriang.h
+++ b/include/ttl/halfedge/hetriang.h
@@ -50,8 +50,7 @@
#include <iostream>
#include <fstream>
#include <ttl/ttl_util.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
+#include <memory>
#include <layers_id_colors_and_visibility.h>
class BOARD_CONNECTED_ITEM;
@@ -69,9 +68,9 @@ namespace hed
// Helper typedefs
class NODE;
class EDGE;
-typedef boost::shared_ptr<NODE> NODE_PTR;
-typedef boost::shared_ptr<EDGE> EDGE_PTR;
-typedef boost::weak_ptr<EDGE> EDGE_WEAK_PTR;
+typedef std::shared_ptr<NODE> NODE_PTR;
+typedef std::shared_ptr<EDGE> EDGE_PTR;
+typedef std::weak_ptr<EDGE> EDGE_WEAK_PTR;
typedef std::vector<NODE_PTR> NODES_CONTAINER;
/**
diff --git a/pcbnew/class_board_connected_item.h b/pcbnew/class_board_connected_item.h
index fea4554..2fa293d 100644
--- a/pcbnew/class_board_connected_item.h
+++ b/pcbnew/class_board_connected_item.h
@@ -171,7 +171,7 @@ public:
* Function GetNetClass
* returns the NETCLASS for this item.
*/
- boost::shared_ptr<NETCLASS> GetNetClass() const;
+ std::shared_ptr<NETCLASS> GetNetClass() const;
/**
* Function GetNetClassName
diff --git a/pcbnew/class_netclass.cpp b/pcbnew/class_netclass.cpp
index 26754f2..46bc606 100644
--- a/pcbnew/class_netclass.cpp
+++ b/pcbnew/class_netclass.cpp
@@ -23,8 +23,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <boost/make_shared.hpp>
-
#include <fctsys.h>
#include <common.h>
#include <kicad_string.h>
@@ -81,7 +79,7 @@ NETCLASS::~NETCLASS()
NETCLASSES::NETCLASSES()
{
- m_Default = boost::make_shared<NETCLASS>( NETCLASS::Default );
+ m_Default = std::make_shared<NETCLASS>( NETCLASS::Default );
}
@@ -125,7 +123,7 @@ NETCLASSPTR NETCLASSES::Remove( const wxString& aNetName )
if( found != m_NetClasses.end() )
{
- boost::shared_ptr<NETCLASS> netclass = found->second;
+ std::shared_ptr<NETCLASS> netclass = found->second;
m_NetClasses.erase( found );
return netclass;
}
diff --git a/pcbnew/class_netclass.h b/pcbnew/class_netclass.h
index 5b6bbe1..658f182 100644
--- a/pcbnew/class_netclass.h
+++ b/pcbnew/class_netclass.h
@@ -33,12 +33,13 @@
#include <set>
#include <map>
-#include <boost/shared_ptr.hpp>
#include <wx/string.h>
#include <richio.h>
+#include <memory>
+
class LINE_READER;
class BOARD;
@@ -206,7 +207,7 @@ public:
#endif
};
-typedef boost::shared_ptr<NETCLASS> NETCLASSPTR;
+typedef std::shared_ptr<NETCLASS> NETCLASSPTR;
/**
* Class NETCLASSES
diff --git a/pcbnew/dialogs/dialog_design_rules.cpp b/pcbnew/dialogs/dialog_design_rules.cpp
index 20a5643..8e72732 100644
--- a/pcbnew/dialogs/dialog_design_rules.cpp
+++ b/pcbnew/dialogs/dialog_design_rules.cpp
@@ -47,8 +47,6 @@
#include <wx/generic/gridctrl.h>
#include <dialog_design_rules_aux_helper_class.h>
-#include <boost/make_shared.hpp>
-
// Column labels for net lists
#define NET_TITLE _( "Net" )
#define CLASS_TITLE _( "Class" )
@@ -505,7 +503,7 @@ void DIALOG_DESIGN_RULES::CopyRulesListToBoard()
// Copy other NetClasses :
for( int row = 1; row < m_grid->GetNumberRows(); ++row )
{
- NETCLASSPTR nc = boost::make_shared<NETCLASS>( m_grid->GetRowLabelValue( row ) );
+ NETCLASSPTR nc = std::make_shared<NETCLASS>( m_grid->GetRowLabelValue( row ) );
if( !m_BrdSettings->m_NetClasses.Add( nc ) )
{
diff --git a/pcbnew/drc_stuff.h b/pcbnew/drc_stuff.h
index b35c9b9..492f314 100644
--- a/pcbnew/drc_stuff.h
+++ b/pcbnew/drc_stuff.h
@@ -30,7 +30,7 @@
#define _DRC_STUFF_H
#include <vector>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#define OK_DRC 0
#define BAD_DRC 1
@@ -289,7 +289,7 @@ private:
//-----<single "item" tests>-----------------------------------------
- bool doNetClass( boost::shared_ptr<NETCLASS> aNetClass, wxString& msg );
+ bool doNetClass( std::shared_ptr<NETCLASS> aNetClass, wxString& msg );
/**
* Function doPadToPadsDrc
diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp
index b95081f..e277619 100644
--- a/pcbnew/legacy_plugin.cpp
+++ b/pcbnew/legacy_plugin.cpp
@@ -87,8 +87,6 @@
#include <trigo.h>
#include <build_version.h>
-#include <boost/make_shared.hpp>
-
typedef LEGACY_PLUGIN::BIU BIU;
@@ -2408,7 +2406,7 @@ void LEGACY_PLUGIN::loadNETCLASS()
// yet since that would bypass duplicate netclass name checking within the BOARD.
// store it temporarily in an unique_ptr until successfully inserted into the BOARD
// just before returning.
- NETCLASSPTR nc = boost::make_shared<NETCLASS>( wxEmptyString );
+ NETCLASSPTR nc = std::make_shared<NETCLASS>( wxEmptyString );
while( ( line = READLINE( m_reader ) ) != NULL )
{
diff --git a/pcbnew/legacy_plugin.h b/pcbnew/legacy_plugin.h
index ddf5971..a1c21d0 100644
--- a/pcbnew/legacy_plugin.h
+++ b/pcbnew/legacy_plugin.h
@@ -26,13 +26,15 @@
*/
#include <io_mgr.h>
-#include <boost/shared_ptr.hpp>
#include <string>
#include <layers_id_colors_and_visibility.h>
+#include <memory>
+
// FOOTPRINT_LIBRARY_HEADER_CNT gives the number of characters to compare to detect
// a footprint library. A few variants may have been used, and so we can only be
// sure that the header contains "PCBNEW-LibModule-V", not "PCBNEW-LibModule-V1".
+
#define FOOTPRINT_LIBRARY_HEADER "PCBNEW-LibModule-V1"
#define FOOTPRINT_LIBRARY_HEADER_CNT 18
diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h
index c6ea211..06f0b8c 100644
--- a/pcbnew/pcb_painter.h
+++ b/pcbnew/pcb_painter.h
@@ -27,9 +27,10 @@
#define __CLASS_PCB_PAINTER_H
#include <layers_id_colors_and_visibility.h>
-#include <boost/shared_ptr.hpp>
#include <painter.h>
+#include <memory>
+
class EDA_ITEM;
class COLORS_DESIGN_SETTINGS;
diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp
index 63e955b..6478f7e 100644
--- a/pcbnew/pcb_parser.cpp
+++ b/pcbnew/pcb_parser.cpp
@@ -51,8 +51,6 @@
#include <zones.h>
#include <pcb_parser.h>
-#include <boost/make_shared.hpp>
-
using namespace PCB_KEYS_T;
@@ -1264,7 +1262,7 @@ void PCB_PARSER::parseNETCLASS() throw( IO_ERROR, PARSE_ERROR )
T token;
- NETCLASSPTR nc = boost::make_shared<NETCLASS>( wxEmptyString );
+ NETCLASSPTR nc = std::make_shared<NETCLASS>( wxEmptyString );
// Read netclass name (can be a name or just a number like track width)
NeedSYMBOLorNUMBER();
diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp
index 71b297a..8cf1ef4 100644
--- a/pcbnew/ratsnest_data.cpp
+++ b/pcbnew/ratsnest_data.cpp
@@ -41,7 +41,6 @@
#include <boost/range/adaptor/map.hpp>
#include <boost/scoped_ptr.hpp>
-#include <boost/make_shared.hpp>
#include <boost/bind.hpp>
#include <geometry/shape_poly_set.h>
@@ -183,9 +182,9 @@ static std::vector<RN_EDGE_MST_PTR>* kruskalMST( RN_LINKS::RN_EDGE_LIST& aEdges,
// Do a copy of edge, but make it RN_EDGE_MST. In contrary to RN_EDGE,
// RN_EDGE_MST saves both source and target node and does not require any other
// edges to exist for getting source/target nodes
- RN_EDGE_MST_PTR newEdge = boost::make_shared<RN_EDGE_MST>( dt->GetSourceNode(),
- dt->GetTargetNode(),
- dt->GetWeight() );
+ RN_EDGE_MST_PTR newEdge = std::make_shared<RN_EDGE_MST>( dt->GetSourceNode(),
+ dt->GetTargetNode(),
+ dt->GetWeight() );
mst->push_back( newEdge );
++mstSize;
}
@@ -293,7 +292,7 @@ const RN_NODE_PTR& RN_LINKS::AddNode( int aX, int aY )
RN_NODE_SET::iterator node;
bool wasNewElement;
- boost::tie( node, wasNewElement ) = m_nodes.emplace( boost::make_shared<RN_NODE>( aX, aY ) );
+ boost::tie( node, wasNewElement ) = m_nodes.emplace( std::make_shared<RN_NODE>( aX, aY ) );
return *node;
}
@@ -316,7 +315,7 @@ RN_EDGE_MST_PTR RN_LINKS::AddConnection( const RN_NODE_PTR& aNode1, const RN_NOD
unsigned int aDistance )
{
assert( aNode1 != aNode2 );
- RN_EDGE_MST_PTR edge = boost::make_shared<RN_EDGE_MST>( aNode1, aNode2, aDistance );
+ RN_EDGE_MST_PTR edge = std::make_shared<RN_EDGE_MST>( aNode1, aNode2, aDistance );
m_edges.push_back( edge );
return edge;
@@ -339,7 +338,7 @@ void RN_NET::compute()
RN_LINKS::RN_NODE_SET::iterator last = ++boardNodes.begin();
// There can be only one possible connection, but it is missing
- m_rnEdges->push_back( boost::make_shared<RN_EDGE_MST>( *boardNodes.begin(), *last ) );
+ m_rnEdges->push_back( std::make_shared<RN_EDGE_MST>( *boardNodes.begin(), *last ) );
}
// Set tags to nodes as connected
diff --git a/pcbnew/ratsnest_data.h b/pcbnew/ratsnest_data.h
index ec996ba..9bae8fb 100644
--- a/pcbnew/ratsnest_data.h
+++ b/pcbnew/ratsnest_data.h
@@ -68,7 +68,7 @@ typedef hed::EDGE RN_EDGE;
typedef hed::EDGE_PTR RN_EDGE_PTR;
typedef hed::EDGE_MST RN_EDGE_MST;
typedef hed::TRIANGULATION TRIANGULATOR;
-typedef boost::shared_ptr<hed::EDGE_MST> RN_EDGE_MST_PTR;
+typedef std::shared_ptr<hed::EDGE_MST> RN_EDGE_MST_PTR;
bool operator==( const RN_NODE_PTR& aFirst, const RN_NODE_PTR& aSecond );
bool operator!=( const RN_NODE_PTR& aFirst, const RN_NODE_PTR& aSecond );
@@ -576,7 +576,7 @@ protected:
RN_LINKS m_links;
///> Vector of edges that makes ratsnest for a given net.
- boost::shared_ptr< std::vector<RN_EDGE_MST_PTR> > m_rnEdges;
+ std::shared_ptr< std::vector<RN_EDGE_MST_PTR> > m_rnEdges;
///> List of nodes which will not be used as ratsnest target nodes.
boost::unordered_set<RN_NODE_PTR> m_blockedNodes;
diff --git a/pcbnew/router/pns_optimizer.h b/pcbnew/router/pns_optimizer.h
index 36bced6..61a0923 100644
--- a/pcbnew/router/pns_optimizer.h
+++ b/pcbnew/router/pns_optimizer.h
@@ -22,7 +22,7 @@
#define __PNS_OPTIMIZER_H
#include <boost/unordered_map.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <geometry/shape_index_list.h>
#include <geometry/shape_line_chain.h>
diff --git a/pcbnew/specctra.h b/pcbnew/specctra.h
index aa072c2..723575e 100644
--- a/pcbnew/specctra.h
+++ b/pcbnew/specctra.h
@@ -31,12 +31,13 @@
// see http://www.boost.org/libs/ptr_container/doc/ptr_set.html
#include <boost/ptr_container/ptr_set.hpp>
-#include <boost/shared_ptr.hpp>
#include <fctsys.h>
#include <specctra_lexer.h>
#include <pcbnew.h>
+#include <memory>
+
// all outside the DSN namespace:
class BOARD;
class TRACK;
@@ -3815,7 +3816,7 @@ class SPECCTRA_DB : public SPECCTRA_LEXER
* Function exportNETCLASS
* exports \a aNetClass to the DSN file.
*/
- void exportNETCLASS( boost::shared_ptr<NETCLASS> aNetClass, BOARD* aBoard );
+ void exportNETCLASS( std::shared_ptr<NETCLASS> aNetClass, BOARD* aBoard );
//-----</FromBOARD>------------------------------------------------------
diff --git a/pcbnew/tools/edit_points.h b/pcbnew/tools/edit_points.h
index ca9e373..b1d8166 100644
--- a/pcbnew/tools/edit_points.h
+++ b/pcbnew/tools/edit_points.h
@@ -25,8 +25,6 @@
#ifndef EDIT_POINTS_H_
#define EDIT_POINTS_H_
-#include <boost/shared_ptr.hpp>
-
#include <base_struct.h>
#include <layers_id_colors_and_visibility.h>
@@ -35,6 +33,9 @@
#include "edit_constraints.h"
+#include <memory>
+
+
/**
* Class EDIT_POINT
*
@@ -173,7 +174,7 @@ private:
VECTOR2I m_position;
///> Constraint for the point, NULL if none
- boost::shared_ptr<EDIT_CONSTRAINT<EDIT_POINT> > m_constraint;
+ std::shared_ptr<EDIT_CONSTRAINT<EDIT_POINT> > m_constraint;
};
@@ -291,7 +292,7 @@ private:
EDIT_POINT& m_end; ///< End point for a line
///> Constraint for the point, NULL if none
- boost::shared_ptr<EDIT_CONSTRAINT<EDIT_LINE> > m_constraint;
+ std::shared_ptr<EDIT_CONSTRAINT<EDIT_LINE> > m_constraint;
};
diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp
index d73a90b..839e3db 100644
--- a/pcbnew/tools/point_editor.cpp
+++ b/pcbnew/tools/point_editor.cpp
@@ -22,7 +22,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <boost/make_shared.hpp>
#include <boost/bind.hpp>
#include <tool/tool_manager.h>
@@ -70,9 +69,9 @@ enum DIMENSION_POINTS
class EDIT_POINTS_FACTORY
{
public:
- static boost::shared_ptr<EDIT_POINTS> Make( EDA_ITEM* aItem, KIGFX::GAL* aGal )
+ static std::shared_ptr<EDIT_POINTS> Make( EDA_ITEM* aItem, KIGFX::GAL* aGal )
{
- boost::shared_ptr<EDIT_POINTS> points = boost::make_shared<EDIT_POINTS>( aItem );
+ std::shared_ptr<EDIT_POINTS> points = std::make_shared<EDIT_POINTS>( aItem );
// Generate list of edit points basing on the item type
switch( aItem->Type() )
diff --git a/pcbnew/tools/point_editor.h b/pcbnew/tools/point_editor.h
index fc4c6a0..eb43e1b 100644
--- a/pcbnew/tools/point_editor.h
+++ b/pcbnew/tools/point_editor.h
@@ -25,11 +25,12 @@
#ifndef __POINT_EDITOR_H
#define __POINT_EDITOR_H
-#include <boost/shared_ptr.hpp>
-
#include <tool/tool_interactive.h>
#include "edit_points.h"
+#include <memory>
+
+
class SELECTION_TOOL;
/**
@@ -69,10 +70,10 @@ private:
EDIT_POINT m_original;
///> Currently available edit points.
- boost::shared_ptr<EDIT_POINTS> m_editPoints;
+ std::shared_ptr<EDIT_POINTS> m_editPoints;
// Alternative constraint, enabled while a modifier key is held
- boost::shared_ptr<EDIT_CONSTRAINT<EDIT_POINT> > m_altConstraint;
+ std::shared_ptr<EDIT_CONSTRAINT<EDIT_POINT> > m_altConstraint;
// EDIT_POINT for alternative constraint mode
EDIT_POINT m_altConstrainer;
diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp
index c548c2f..a5f8202 100644
--- a/pcbnew/tools/selection_tool.cpp
+++ b/pcbnew/tools/selection_tool.cpp
@@ -781,7 +781,7 @@ void SELECTION_TOOL::clearSelection()
BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector )
{
BOARD_ITEM* current = NULL;
- boost::shared_ptr<BRIGHT_BOX> brightBox;
+ std::shared_ptr<BRIGHT_BOX> brightBox;
CONTEXT_MENU menu;
int limit = std::min( 10, aCollector->GetCount() );
Follow ups
References
-
[PATCH 00/16] Simple patches
From: Simon Richter, 2016-06-07
-
[PATCH 01/16] Fix spelling "propage" -> "propagate"
From: Simon Richter, 2016-06-07
-
[PATCH 02/16] Add missing dependency github_plugin -> pcbcommon
From: Simon Richter, 2016-06-07
-
[PATCH 03/16] Clarify ERC: we're iterating netlist items, not nets
From: Simon Richter, 2016-06-07
-
[PATCH 04/16] Explain how ERC works.
From: Simon Richter, 2016-06-07
-
[PATCH 05/16] Cache netlist item during ERC
From: Simon Richter, 2016-06-07
-
[PATCH 06/16] Check sorting of netlist during ERC
From: Simon Richter, 2016-06-07
-
[PATCH 07/16] Kill unused NETLIST_EXPORTER_GENERIC::writeListOfNets
From: Simon Richter, 2016-06-07
-
[PATCH 08/16] Drop extra copy ctors from IFSG_NODE
From: Simon Richter, 2016-06-07