Skip to content

Commit

Permalink
use unique_ptr (C++11) instead of make_unique (C++14) (NanoComp#1844)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj authored and Mo Chen committed Feb 22, 2022
1 parent b91da90 commit b9394ae
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/GDSIIgeom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,7 @@ geometric_object get_GDSII_prism(material_type material, const char *GDSIIFile,
dVec polygon = get_polygon(GDSIIFile, Text, Layer);

int num_vertices = polygon.size() / 2;
<<<<<<< HEAD
std::unique_ptr<vector3[]> vertices(new vector3[num_vertices]);
=======
auto vertices = std::make_unique<vector3[]>(num_vertices);
>>>>>>> Fix memory leaks (#1839)
for (int nv = 0; nv < num_vertices; nv++) {
vertices[nv].x = polygon[2 * nv + 0];
vertices[nv].y = polygon[2 * nv + 1];
Expand Down

0 comments on commit b9394ae

Please sign in to comment.