jhasse / poly2tri

2D constrained Delaunay triangulation library
BSD 3-Clause "New" or "Revised" License
429 stars 89 forks source link

Small performance issue when getting triangles #37

Open icedevelopment opened 2 years ago

icedevelopment commented 2 years ago

Is it possible to change the return value of std::vector<p2t::Triangle*> CDT::GetTriangles() ?

It receive a reference from sweepcontext->GetTriangles(); but it is converted into a copy of the vector that takes more time than if the vector returned by const reference.

Same for std::list<p2t::Triangle*> CDT::GetMap()