Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use unique_ptr (C++11) instead of make_unique (C++14) #1844

Merged
merged 1 commit into from
Dec 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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