diff --git a/src/libslic3r/GCode/GCodeProcessor.cpp b/src/libslic3r/GCode/GCodeProcessor.cpp index 3e7478c05..ecb5e263e 100644 --- a/src/libslic3r/GCode/GCodeProcessor.cpp +++ b/src/libslic3r/GCode/GCodeProcessor.cpp @@ -1924,7 +1924,7 @@ void GCodeProcessor::process_tags(const std::string_view comment, bool producers if (!m_result.spiral_vase_layers.empty() && m_end_position[Z] == m_result.spiral_vase_layers.back().first) m_result.spiral_vase_layers.back().second.second = move_id; else - m_result.spiral_vase_layers.push_back({ m_end_position[Z], { move_id, move_id } }); + m_result.spiral_vase_layers.push_back({ static_cast(m_end_position[Z]), { move_id, move_id } }); } #endif // ENABLE_SPIRAL_VASE_LAYERS return; @@ -2474,7 +2474,7 @@ void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line) AxisCoords delta_pos; for (unsigned char a = X; a <= E; ++a) { delta_pos[a] = m_end_position[a] - m_start_position[a]; - max_abs_delta = std::max(max_abs_delta, std::abs(delta_pos[a])); + max_abs_delta = std::max(max_abs_delta, std::abs(delta_pos[a])); } // no displacement, return @@ -2584,7 +2584,7 @@ void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line) if (curr.abs_axis_feedrate[a] != 0.0f) { float axis_max_feedrate = get_axis_max_feedrate(static_cast(i), static_cast(a)); if (axis_max_feedrate != 0.0f) - min_feedrate_factor = std::min(min_feedrate_factor, axis_max_feedrate / curr.abs_axis_feedrate[a]); + min_feedrate_factor = std::min(min_feedrate_factor, axis_max_feedrate / curr.abs_axis_feedrate[a]); } } @@ -3211,7 +3211,7 @@ void GCodeProcessor::store_move_vertex(EMoveType type) #else Vec3f(m_end_position[X], m_end_position[Y], m_processing_start_custom_gcode ? m_first_layer_height : m_end_position[Z]) + m_extruder_offsets[m_extruder_id], #endif // ENABLE_Z_OFFSET_CORRECTION - m_end_position[E] - m_start_position[E], + static_cast(m_end_position[E] - m_start_position[E]), m_feedrate, m_width, m_height, diff --git a/src/libslic3r/GCode/GCodeProcessor.hpp b/src/libslic3r/GCode/GCodeProcessor.hpp index 5132825e5..ea12051b2 100644 --- a/src/libslic3r/GCode/GCodeProcessor.hpp +++ b/src/libslic3r/GCode/GCodeProcessor.hpp @@ -172,7 +172,7 @@ namespace Slic3r { #endif // ENABLE_GCODE_VIEWER_DATA_CHECKING private: - using AxisCoords = std::array; + using AxisCoords = std::array; using ExtruderColors = std::vector; using ExtruderTemps = std::vector;