Fixing Clang warnings 2
This commit is contained in:
parent
0ff0444dcc
commit
b85de89751
22 changed files with 70 additions and 107 deletions
src/slic3r/GUI
|
@ -2771,7 +2771,7 @@ void GCodeViewer::refresh_render_paths(bool keep_sequential_current_first, bool
|
|||
return color;
|
||||
};
|
||||
|
||||
auto travel_color = [this](const Path& path) {
|
||||
auto travel_color = [](const Path& path) {
|
||||
return (path.delta_extruder < 0.0f) ? Travel_Colors[2] /* Retract */ :
|
||||
((path.delta_extruder > 0.0f) ? Travel_Colors[1] /* Extrude */ :
|
||||
Travel_Colors[0] /* Move */);
|
||||
|
@ -3436,7 +3436,7 @@ void GCodeViewer::render_toolpaths() const
|
|||
shader.set_uniform("uniform_color", color4);
|
||||
};
|
||||
|
||||
auto render_as_points = [this, zoom, point_size, near_plane_height, set_uniform_color]
|
||||
auto render_as_points = [zoom, point_size, near_plane_height, set_uniform_color]
|
||||
(const TBuffer& buffer, unsigned int ibuffer_id, GLShaderProgram& shader) {
|
||||
#if ENABLE_FIXED_SCREEN_SIZE_POINT_MARKERS
|
||||
shader.set_uniform("use_fixed_screen_size", 1);
|
||||
|
@ -3466,7 +3466,7 @@ void GCodeViewer::render_toolpaths() const
|
|||
glsafe(::glDisable(GL_VERTEX_PROGRAM_POINT_SIZE));
|
||||
};
|
||||
|
||||
auto render_as_lines = [this, light_intensity, set_uniform_color](const TBuffer& buffer, unsigned int ibuffer_id, GLShaderProgram& shader) {
|
||||
auto render_as_lines = [light_intensity, set_uniform_color](const TBuffer& buffer, unsigned int ibuffer_id, GLShaderProgram& shader) {
|
||||
shader.set_uniform("light_intensity", light_intensity);
|
||||
for (const RenderPath& path : buffer.render_paths) {
|
||||
if (path.index_buffer_id == ibuffer_id) {
|
||||
|
@ -3479,7 +3479,7 @@ void GCodeViewer::render_toolpaths() const
|
|||
}
|
||||
};
|
||||
|
||||
auto render_as_triangles = [this, set_uniform_color](const TBuffer& buffer, unsigned int ibuffer_id, GLShaderProgram& shader) {
|
||||
auto render_as_triangles = [set_uniform_color](const TBuffer& buffer, unsigned int ibuffer_id, GLShaderProgram& shader) {
|
||||
for (const RenderPath& path : buffer.render_paths) {
|
||||
if (path.index_buffer_id == ibuffer_id) {
|
||||
set_uniform_color(path.color, shader);
|
||||
|
@ -3874,8 +3874,8 @@ void GCodeViewer::render_legend() const
|
|||
ImGui::PopStyleVar();
|
||||
};
|
||||
|
||||
auto append_range = [this, draw_list, &imgui, append_item](const Extrusions::Range& range, unsigned int decimals) {
|
||||
auto append_range_item = [this, draw_list, &imgui, append_item](int i, float value, unsigned int decimals) {
|
||||
auto append_range = [append_item](const Extrusions::Range& range, unsigned int decimals) {
|
||||
auto append_range_item = [append_item](int i, float value, unsigned int decimals) {
|
||||
char buf[1024];
|
||||
::sprintf(buf, "%.*f", decimals, value);
|
||||
append_item(EItemType::Rect, Range_Colors[i], buf);
|
||||
|
@ -3969,7 +3969,7 @@ void GCodeViewer::render_legend() const
|
|||
return _u8L("from") + " " + std::string(buf1) + " " + _u8L("to") + " " + std::string(buf2) + " " + _u8L("mm");
|
||||
};
|
||||
|
||||
auto role_time_and_percent = [this, time_mode](ExtrusionRole role) {
|
||||
auto role_time_and_percent = [ time_mode](ExtrusionRole role) {
|
||||
auto it = std::find_if(time_mode.roles_times.begin(), time_mode.roles_times.end(), [role](const std::pair<ExtrusionRole, float>& item) { return role == item.first; });
|
||||
return (it != time_mode.roles_times.end()) ? std::make_pair(it->second, it->second / time_mode.time) : std::make_pair(0.0f, 0.0f);
|
||||
};
|
||||
|
@ -4177,7 +4177,7 @@ void GCodeViewer::render_legend() const
|
|||
return items;
|
||||
};
|
||||
|
||||
auto append_color_change = [this, &imgui](const Color& color1, const Color& color2, const std::array<float, 2>& offsets, const Times& times) {
|
||||
auto append_color_change = [&imgui](const Color& color1, const Color& color2, const std::array<float, 2>& offsets, const Times& times) {
|
||||
imgui.text(_u8L("Color change"));
|
||||
ImGui::SameLine();
|
||||
|
||||
|
@ -4196,7 +4196,7 @@ void GCodeViewer::render_legend() const
|
|||
imgui.text(short_time(get_time_dhms(times.second - times.first)));
|
||||
};
|
||||
|
||||
auto append_print = [this, &imgui](const Color& color, const std::array<float, 2>& offsets, const Times& times) {
|
||||
auto append_print = [&imgui](const Color& color, const std::array<float, 2>& offsets, const Times& times) {
|
||||
imgui.text(_u8L("Print"));
|
||||
ImGui::SameLine();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue