Skip to content
Snippets Groups Projects
Commit 6586bd6e authored by Maik Nijhuis's avatar Maik Nijhuis
Browse files

Merge branch 'ast-1351-initialize-centroid-point' into 'master'

AST-1351 Avoid 'maybe-uninitialized' warning for point_f x

See merge request !126
parents da0ef2a6 f3b54588
No related branches found
No related tags found
1 merge request!126AST-1351 Avoid 'maybe-uninitialized' warning for point_f x
Pipeline #56311 failed
......@@ -106,10 +106,11 @@ PixelPosition Facet::Centroid() const {
boost::geometry::model::point<float, 2, boost::geometry::cs::cartesian>;
boost::geometry::model::polygon<point_f> poly;
point_f x;
for (const PixelPosition& pixel : pixels_) {
boost::geometry::append(poly, point_f(pixel.x, pixel.y));
}
point_f x{};
boost::geometry::centroid(poly, x);
return PixelPosition(x.get<0>(), x.get<1>());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment