modernize C++: make unique

This commit is contained in:
wmayer
2023-08-07 20:01:45 +02:00
committed by Chris Hennes
parent c2e17824fa
commit ec73caa40e
30 changed files with 134 additions and 124 deletions

View File

@@ -1043,12 +1043,12 @@ PyObject* BSplineCurvePy::interpolate(PyObject *args, PyObject *kwds)
std::unique_ptr<GeomAPI_Interpolate> aBSplineInterpolation;
if (parameters.IsNull()) {
aBSplineInterpolation.reset(new GeomAPI_Interpolate(interpolationPoints,
Base::asBoolean(periodic), tol3d));
aBSplineInterpolation = std::make_unique<GeomAPI_Interpolate>(interpolationPoints,
Base::asBoolean(periodic), tol3d);
}
else {
aBSplineInterpolation.reset(new GeomAPI_Interpolate(interpolationPoints, parameters,
Base::asBoolean(periodic), tol3d));
aBSplineInterpolation = std::make_unique<GeomAPI_Interpolate>(interpolationPoints, parameters,
Base::asBoolean(periodic), tol3d);
}
if (t1 && t2) {