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:
bubnikv 2017-03-22 15:35:09 +01:00
parent 6b99cbdc02
commit 04cd474708
7 changed files with 17 additions and 54 deletions

View file

@ -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