diff --git a/include/ExtruderPlan.h b/include/ExtruderPlan.h index 7f534d1ec8..e5fc1dd11d 100644 --- a/include/ExtruderPlan.h +++ b/include/ExtruderPlan.h @@ -44,7 +44,7 @@ class ExtruderPlan FRIEND_TEST(ExtruderPlanTest, BackPressureCompensationEmptyPlan); #endif public: - size_t extruder_nr_; //!< The extruder used for this paths in the current plan. + size_t extruder_nr_{ 0 }; //!< The extruder used for this paths in the current plan. ExtruderPlan() noexcept = default; diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index 441e0faebd..6077daa44d 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -1592,7 +1592,7 @@ void ExtruderPlan::forceMinimalLayerTime(double minTime, double time_other_extr_ // Slowing down to the slowest_speed is sufficient to respect the minimum layer time. // Linear interpolate between extrudeTime and total_extrude_time_at_slowest_speed const double factor = (1 / total_extrude_time_at_slowest_speed - 1 / minExtrudeTime) / (1 / total_extrude_time_at_slowest_speed - 1 / extrudeTime); - slow_down_func = [&slowest_path_speed = slowest_path_speed_, &factor](const GCodePath& path) + slow_down_func = [&slowest_path_speed = slowest_path_speed_, factor](const GCodePath& path) { const double actual_target_speed = slowest_path_speed * (1.0 - factor) + (path.config.getSpeed() * path.speed_factor) * factor; return std::min(actual_target_speed / (path.config.getSpeed() * path.speed_factor), 1.0);