Fixed some compiler warnings

This commit is contained in:
Vojtech Bubnik 2021-05-31 14:48:12 +02:00
parent 660acede9e
commit df87f1b929
2 changed files with 6 additions and 6 deletions

View file

@ -376,7 +376,7 @@ std::vector<double> smooth_height_profile(const std::vector<double>& profile, co
}
}
height = std::clamp((weight_total != 0.0) ? height /= weight_total : hi, slicing_params.min_layer_height, slicing_params.max_layer_height);
height = std::clamp(weight_total == 0 ? hi : height / weight_total, slicing_params.min_layer_height, slicing_params.max_layer_height);
if (smoothing_params.keep_min)
height = std::min(height, hi);
}