kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #24401
[PATCH 2/3] Replace unshared boost::shared_array with std::unique_ptr
These are never shared, so std::unique_ptr works fine.
---
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 4325fe7..330e390 100644
--- a/common/gal/opengl/opengl_gal.cpp
+++ b/common/gal/opengl/opengl_gal.cpp
@@ -510,7 +510,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 )
@@ -543,7 +543,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