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 16, 2022
1 parent f9d0bb7 commit 1141201
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/GDSIIgeom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ geometric_object_list get_GDSII_prisms(material_type material, const char *GDSII
for (int np = 0; np < num_prisms; np++) {
dVec polygon = polygons[np];
int num_vertices = polygon.size() / 2;
auto vertices = std::make_unique<vector3[]>(num_vertices);
std::unique_ptr<vector3[]> vertices(new vector3[num_vertices]);
for (int nv = 0; nv < num_vertices; nv++) {
vertices[nv].x = polygon[2 * nv + 0];
vertices[nv].y = polygon[2 * nv + 1];
Expand All @@ -170,7 +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;
auto vertices = std::make_unique<vector3[]>(num_vertices);
std::unique_ptr<vector3[]> vertices(new vector3[num_vertices]);
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 1141201

Please sign in to comment.