Skip to content

Commit 767935f

Browse files
committed
libdxfrw: Update the submodule to the latest version from LibreCAD
Matches LibreCAD/libdxfrw@d2fd96b with SolveSpace patches applied.
1 parent 592edbd commit 767935f

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

src/exportvector.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,17 +134,17 @@ class DxfWriteInterface : public DRW_Interface {
134134
polyline.flags |= 8 /* 3d polyline */;
135135
}
136136
polyline.vertlist.push_back(
137-
new DRW_Vertex(start->pos.x, start->pos.y, start->pos.z, 0.0));
137+
std::make_shared<DRW_Vertex>(start->pos.x, start->pos.y, start->pos.z, 0.0));
138138
polyline.vertlist.push_back(
139-
new DRW_Vertex(next->pos.x, next->pos.y, next->pos.z, 0.0));
139+
std::make_shared<DRW_Vertex>(next->pos.x, next->pos.y, next->pos.z, 0.0));
140140
};
141141

142142
auto nextFunc = [&](PolylineBuilder::Vertex *next, PolylineBuilder::Edge *e) {
143143
if(!EXACT(next->pos.z == 0.0)) {
144144
polyline.flags |= 8 /* 3d polyline */;
145145
}
146146
polyline.vertlist.push_back(
147-
new DRW_Vertex(next->pos.x, next->pos.y, next->pos.z, 0.0));
147+
std::make_shared<DRW_Vertex>(next->pos.x, next->pos.y, next->pos.z, 0.0));
148148
};
149149

150150
auto endFunc = [&]() {
@@ -370,8 +370,7 @@ class DxfWriteInterface : public DRW_Interface {
370370
assignEntityDefaults(&polyline, hs);
371371
for(int i = 0; i < lv.n; i++) {
372372
Vector *v = &lv[i];
373-
DRW_Vertex *vertex = new DRW_Vertex(v->x, v->y, v->z, 0.0);
374-
polyline.vertlist.push_back(vertex);
373+
polyline.vertlist.push_back(std::make_shared<DRW_Vertex>(v->x, v->y, v->z, 0.0));
375374
}
376375
dxf->writePolyline(&polyline);
377376
lv.Clear();
@@ -411,7 +410,7 @@ class DxfWriteInterface : public DRW_Interface {
411410
makeKnotsFor(&spline);
412411
for(int i = 0; i <= sb->deg; i++) {
413412
spline.controllist.push_back(
414-
new DRW_Coord(sb->ctrl[i].x, sb->ctrl[i].y, sb->ctrl[i].z));
413+
std::make_shared<DRW_Coord>(sb->ctrl[i].x, sb->ctrl[i].y, sb->ctrl[i].z));
415414
if(isRational) spline.weightlist.push_back(sb->weight[i]);
416415
}
417416
dxf->writeSpline(&spline);

0 commit comments

Comments
 (0)