Closed EmmanuelMess closed 2 years ago
p2t::CDT
's ctor requires std::vector<p2t::Point*>
, therefore we can't using std::unique_ptr
there.
p2t::CDT
's ctor requiresstd::vector<p2t::Point*>
, therefore we can't usingstd::unique_ptr
there.
Why does it require pointers?
It doesn't really "require" them , but it was written that way at a time where C++11 wasn't a thing. We could overload it with a variant which accepts a unique_ptr vector, but just changing the unit test won't work.
We could overload it with a variant which accepts a unique_ptr vector,
That seems like a good idea.
Shouldn't this be
make_unique
?https://github.com/jhasse/poly2tri/blob/8b5fa15800ab8ef44ed7b0ec7061e907d5e49059/unittest/main.cpp#L19