mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 10:32:20 +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:
@@ -114,7 +114,7 @@ void Line::extend(double offset)
|
||||
|
||||
Vec3d Linef3::intersect_plane(double z) const
|
||||
{
|
||||
auto v = (this->b - this->a).cast<double>();
|
||||
Vec3d v = (this->b - this->a).cast<double>();
|
||||
double t = (z - this->a(2)) / v(2);
|
||||
return Vec3d(this->a(0) + v(0) * t, this->a(1) + v(1) * t, z);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user