From e831cb07ab4fd9f393995b0e5287c5e8bff55597 Mon Sep 17 00:00:00 2001 From: supermerill Date: Mon, 9 Nov 2020 01:16:17 +0100 Subject: [PATCH] fix compilation --- src/libslic3r/GCode.cpp | 12 +++++------- src/libslic3r/GCode/GCodeProcessor.cpp | 2 +- src/slic3r/GUI/Tab.cpp | 4 ++-- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index d8739e226..8ca6d3d62 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -832,13 +832,11 @@ void GCode::do_export(Print* print, const char* path, GCodePreviewData* preview_ #endif // ENABLE_GCODE_VIEWER - std::error_code err_code; - if (rename_file(path_tmp, path)) - if (copy_file(path_tmp, path, ("Failed to rename the output G-code file from " + path_tmp + " to " + path + '\n' + - "Is " + path_tmp + " locked? " + err_code.message() + '\n'), true) != CopyFileResult::SUCCESS) - throw Slic3r::RuntimeError( - std::string("Failed to rename the output G-code file from ") + path_tmp + " to " + path + '\n' + - "Is " + path_tmp + " locked? " + err_code.message() + '\n'); + if (rename_file(path_tmp, path)) { + std::string err_msg = ("Failed to rename the output G-code file from " + path_tmp + " to " + path + '\n'); + if (copy_file(path_tmp, path, err_msg, true) != CopyFileResult::SUCCESS) + throw Slic3r::RuntimeError(err_msg); + } BOOST_LOG_TRIVIAL(info) << "Exporting G-code finished" << log_memory_info(); print->set_done(psGCodeExport); diff --git a/src/libslic3r/GCode/GCodeProcessor.cpp b/src/libslic3r/GCode/GCodeProcessor.cpp index 62765cc55..e0c109962 100644 --- a/src/libslic3r/GCode/GCodeProcessor.cpp +++ b/src/libslic3r/GCode/GCodeProcessor.cpp @@ -2157,7 +2157,7 @@ void GCodeProcessor::store_move_vertex(EMoveType type) m_height, m_mm3_per_mm, m_fan_speed, - m_layer_id, //layer_duration: set later + float(m_layer_id), //layer_duration: set later m_time_processor.machines[0].time, //time: set later m_temperature }; diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 3064583c6..84aca3442 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -1744,11 +1744,11 @@ bool Tab::create_pages(std::string setting_type_name, int idx_page) if (!in_line) { if (colored) { m_colored_Label_colors[setting_id] = &m_default_text_clr; - Line l = current_group->create_single_option_line(option, label_path.empty() ? wxEmptyString : label_path); + Line l = current_group->create_single_option_line(option, label_path.empty() ? wxString(wxEmptyString) : wxString(label_path)); l.full_Label_color = m_colored_Label_colors[setting_id]; current_group->append_line(l); } else { - current_group->append_line(current_group->create_single_option_line(option, label_path.empty() ? wxEmptyString : label_path)); + current_group->append_line(current_group->create_single_option_line(option, label_path.empty() ? wxString(wxEmptyString) : wxString(label_path))); } } else { current_line.append_option(option);