[Path] Use std::shared_ptr instead of boost::shared_ptr

There's no need to use boost version when stl has support for shared_ptr
This commit is contained in:
Benjamin Nauck
2021-03-06 01:05:15 +01:00
committed by wwmayer
parent f555754810
commit 991dbd75c5

View File

@@ -243,7 +243,7 @@ boost::python::list spanIntersect(const Span& span1, const Span& span2) {
}
//Matrix(boost::python::list &l){}
boost::shared_ptr<geoff_geometry::Matrix> matrix_constructor(const boost::python::list& lst) {
std::shared_ptr<geoff_geometry::Matrix> matrix_constructor(const boost::python::list& lst) {
double m[16] = {1,0,0,0,0,1,0,0, 0,0,1,0, 0,0,0,1};
boost::python::ssize_t n = boost::python::len(lst);
@@ -255,7 +255,7 @@ boost::shared_ptr<geoff_geometry::Matrix> matrix_constructor(const boost::python
if(j>=16)break;
}
return boost::shared_ptr<geoff_geometry::Matrix>( new geoff_geometry::Matrix(m) );
return std::shared_ptr<geoff_geometry::Matrix>( new geoff_geometry::Matrix(m) );
}
boost::python::list InsideCurves(const CArea& a, const CCurve& curve) {
@@ -486,7 +486,7 @@ BOOST_PYTHON_MODULE(area) {
.def("GetArea",&AreaGetArea)
;
bp::class_<geoff_geometry::Matrix, boost::shared_ptr<geoff_geometry::Matrix> > ("Matrix")
bp::class_<geoff_geometry::Matrix, std::shared_ptr<geoff_geometry::Matrix> > ("Matrix")
.def(bp::init<geoff_geometry::Matrix>())
.def("__init__", bp::make_constructor(&matrix_constructor))
.def("TransformedPoint", &transformed_point)