Minor beautification

This commit is contained in:
tamasmeszaros 2021-10-12 10:55:18 +02:00
parent cedfc5e3fb
commit ac414e226f
2 changed files with 6 additions and 6 deletions

View File

@ -47,7 +47,7 @@ private:
public: public:
// Forwarded constructor // Forwarded constructor
template<class... Args> template<class... Args>
inline CachedObject(Setter fn, Args &&... args) inline CachedObject(Setter &&fn, Args &&... args)
: m_obj(std::forward<Args>(args)...), m_valid(false), m_setter(fn) : m_obj(std::forward<Args>(args)...), m_valid(false), m_setter(fn)
{} {}
@ -55,7 +55,7 @@ public:
// the next retrieval (Setter will be called). The data that is used in // the next retrieval (Setter will be called). The data that is used in
// the setter function should be guarded as well during modification so // the setter function should be guarded as well during modification so
// the modification has to take place in fn. // the modification has to take place in fn.
inline void invalidate(std::function<void()> fn) template<class Fn> void invalidate(Fn &&fn)
{ {
std::lock_guard<SpinMutex> lck(m_lck); std::lock_guard<SpinMutex> lck(m_lck);
fn(); fn();

View File

@ -138,14 +138,14 @@ Transform3d SLAPrint::sla_trafo(const ModelObject &model_object) const
offset(1) = 0.; offset(1) = 0.;
rotation(2) = 0.; rotation(2) = 0.;
offset(Z) *= corr(Z); offset.z() *= corr.z();
auto trafo = Transform3d::Identity(); auto trafo = Transform3d::Identity();
trafo.translate(offset); trafo.translate(offset);
trafo.scale(corr); trafo.scale(corr);
trafo.rotate(Eigen::AngleAxisd(rotation(2), Vec3d::UnitZ())); trafo.rotate(Eigen::AngleAxisd(rotation.z(), Vec3d::UnitZ()));
trafo.rotate(Eigen::AngleAxisd(rotation(1), Vec3d::UnitY())); trafo.rotate(Eigen::AngleAxisd(rotation.y(), Vec3d::UnitY()));
trafo.rotate(Eigen::AngleAxisd(rotation(0), Vec3d::UnitX())); trafo.rotate(Eigen::AngleAxisd(rotation.x(), Vec3d::UnitX()));
trafo.scale(model_instance.get_scaling_factor()); trafo.scale(model_instance.get_scaling_factor());
trafo.scale(model_instance.get_mirror()); trafo.scale(model_instance.get_mirror());