mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-05 21:14:01 -06:00
Fixed some instance of simplify_polygons() invocation.
Geometry::deg2rad() made a template. Some methods of Layer made inline. Added a helper template remove_nulls().
This commit is contained in:
parent
6b99cbdc02
commit
04cd474708
7 changed files with 17 additions and 54 deletions
|
@ -119,6 +119,14 @@ void append(std::vector<T>& dest, std::vector<T>&& src)
|
|||
src.shrink_to_fit();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void remove_nulls(std::vector<T*> &vec)
|
||||
{
|
||||
vec.erase(
|
||||
std::remove_if(vec.begin(), vec.end(), [](const T *ptr) { return ptr == nullptr; }),
|
||||
vec.end());
|
||||
}
|
||||
|
||||
} // namespace Slic3r
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue