kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #24925
[PATCH 10/16] Replace unshared boost::shared_array with std::unique_ptr
These are never shared, so std::unique_ptr works fine, and std::unique_ptr
has a specialisation for array types that uses "operator delete[]", so this
is still correct.
---
common/gal/opengl/opengl_gal.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp
index 77d51a7..c3fbfee 100644
--- a/common/gal/opengl/opengl_gal.cpp
+++ b/common/gal/opengl/opengl_gal.cpp
@@ -633,7 +633,7 @@ void OPENGL_GAL::DrawPolygon( const std::deque<VECTOR2D>& aPointList )
gluTessBeginPolygon( tesselator, ¶ms );
gluTessBeginContour( tesselator );
- boost::shared_array<GLdouble> points( new GLdouble[3 * aPointList.size()] );
+ std::unique_ptr<GLdouble[]> points( new GLdouble[ 3 * aPointList.size() ] );
int v = 0;
for( std::deque<VECTOR2D>::const_iterator it = aPointList.begin(); it != aPointList.end(); ++it )
@@ -666,7 +666,7 @@ void OPENGL_GAL::DrawPolygon( const VECTOR2D aPointList[], int aListSize )
gluTessBeginPolygon( tesselator, ¶ms );
gluTessBeginContour( tesselator );
- boost::shared_array<GLdouble> points( new GLdouble[3 * aListSize] );
+ std::unique_ptr<GLdouble[]> points( new GLdouble[3 * aListSize] );
int v = 0;
const VECTOR2D* ptr = aPointList;
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
-
[PATCH 09/16] Replace boost::shared_ptr with std::shared_ptr
From: Simon Richter, 2016-06-07