mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
Avoid using auto as type of Eigen expressions. (#8577)
According to https://eigen.tuxfamily.org/dox/TopicPitfalls.html one should just avoid using `auto` as the type of an Eigen expression. This PR fixes most of them I could found in the project. There might be cases that I missed, and I might update those later if I noticed. This should prevent issues like #7741 and hopefully fix some mysterious crashes happened inside Eigen calls.
This commit is contained in:
@@ -50,7 +50,7 @@ void Point::rotate(double angle, const Point ¢er)
|
||||
Vec2d cur = this->cast<double>();
|
||||
double s = ::sin(angle);
|
||||
double c = ::cos(angle);
|
||||
auto d = cur - center.cast<double>();
|
||||
Vec2d d = cur - center.cast<double>();
|
||||
this->x() = fast_round_up<coord_t>(center.x() + c * d.x() - s * d.y());
|
||||
this->y() = fast_round_up<coord_t>(center.y() + s * d.x() + c * d.y());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user