Revert "Fix Compile Warnings (#5963)"

This reverts commit b83e16dbdd.

Found regressions like auto orientation didn't work anymore after this change, revert it
This commit is contained in:
SoftFever 2024-08-12 00:00:20 +08:00
parent 0286c36f42
commit 7082e945b1
184 changed files with 1091 additions and 461 deletions

View file

@ -51,6 +51,7 @@ void Polyline::reverse()
// removes the given distance from the end of the polyline
void Polyline::clip_end(double distance)
{
bool last_point_inserted = false;
size_t remove_after_index = MultiPoint::size();
while (distance > 0) {
Vec2d last_point = this->last_point().cast<double>();
@ -64,6 +65,7 @@ void Polyline::clip_end(double distance)
double lsqr = v.squaredNorm();
if (lsqr > distance * distance) {
this->points.emplace_back((last_point + v * (distance / sqrt(lsqr))).cast<coord_t>());
last_point_inserted = true;
break;
}
distance -= sqrt(lsqr);