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:
Noisyfox
2025-02-26 23:07:23 +08:00
committed by GitHub
parent 41584cfae3
commit 51916ff058
18 changed files with 45 additions and 45 deletions

View File

@@ -1887,7 +1887,7 @@ uint32_t priv::get_closest_point_index(const SearchData &sd,
const Polygon &poly = (id.polygon_index == 0) ?
shape.contour :
shape.holes[id.polygon_index - 1];
auto p_ = p.cast<coord_t>();
Vec2crd p_ = p.cast<coord_t>();
return p_ == poly[id.point_index];
};