diff --git a/.github/ISSUE_TEMPLATE/bug_report_form.yml b/.github/ISSUE_TEMPLATE/bug_report_form.yml index 7cbaddc49f..cb35544473 100644 --- a/.github/ISSUE_TEMPLATE/bug_report_form.yml +++ b/.github/ISSUE_TEMPLATE/bug_report_form.yml @@ -22,7 +22,7 @@ body: label: Project file & How to reproduce description: "*Please* upload a ZIP archive containing the project file used when the problem arise. Please export it just before the problem occurs. Even if you did nothing and/or there is no object, export it! (it contains your current configuration)." placeholder: | - `File`->`Export project as...` then zip it & drop it here + `File`->`Save project as...` then zip it & drop it here Also, if needed include the steps to reproduce the bug: 1. Go to '...' 2. Click on '....' diff --git a/src/hints/HintsToPot.cpp b/src/hints/HintsToPot.cpp index 7c8029cdeb..4791f0612f 100644 --- a/src/hints/HintsToPot.cpp +++ b/src/hints/HintsToPot.cpp @@ -9,7 +9,7 @@ bool write_to_pot(boost::filesystem::path path, const std::vector>& data) { - boost::filesystem::ofstream file(std::move(path), std::ios_base::app); + boost::nowide::ofstream file(path.string(), std::ios_base::app); for (const auto& element : data) { //Example of .pot element diff --git a/src/libslic3r/Fill/Lightning/TreeNode.cpp b/src/libslic3r/Fill/Lightning/TreeNode.cpp index b36a66dbb7..d1820410ee 100644 --- a/src/libslic3r/Fill/Lightning/TreeNode.cpp +++ b/src/libslic3r/Fill/Lightning/TreeNode.cpp @@ -375,8 +375,9 @@ void Node::convertToPolylines(size_t long_line_idx, Polygons& output) const void Node::removeJunctionOverlap(Polygons& result_lines, const coord_t line_width) const { const coord_t reduction = line_width / 2; // TODO make configurable? - for (auto poly_it = result_lines.begin(); poly_it != result_lines.end(); ) { - Polygon &polyline = *poly_it; + size_t res_line_idx = 0; + while (res_line_idx < result_lines.size()) { + Polygon &polyline = result_lines[res_line_idx]; if (polyline.size() <= 1) { polyline = std::move(result_lines.back()); result_lines.pop_back(); @@ -403,7 +404,7 @@ void Node::removeJunctionOverlap(Polygons& result_lines, const coord_t line_widt polyline = std::move(result_lines.back()); result_lines.pop_back(); } else - ++ poly_it; + ++ res_line_idx; } } diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index f3a1c15b3e..f171cb14dd 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -84,7 +84,7 @@ ConfigFileType guess_config_file_type(const ptree &tree) VendorProfile VendorProfile::from_ini(const boost::filesystem::path &path, bool load_all) { ptree tree; - boost::filesystem::ifstream ifs(path); + boost::nowide::ifstream ifs(path.string()); boost::property_tree::read_ini(ifs, tree); return VendorProfile::from_ini(tree, path, load_all); } diff --git a/src/slic3r/GUI/HintNotification.cpp b/src/slic3r/GUI/HintNotification.cpp index 93e0fb3259..820b74eedb 100644 --- a/src/slic3r/GUI/HintNotification.cpp +++ b/src/slic3r/GUI/HintNotification.cpp @@ -14,12 +14,14 @@ #include "libslic3r/Config.hpp" #include "libslic3r/PrintConfig.hpp" +#include + #include #include #include #include #include -#include + #include #include #include @@ -65,7 +67,7 @@ inline void push_style_color(ImGuiCol idx, const ImVec4& col, bool fading_out, f void write_used_binary(const std::vector& ids) { - boost::filesystem::ofstream file((boost::filesystem::path(data_dir()) / "cache" / "hints.cereal"), std::ios::binary); + boost::nowide::ofstream file((boost::filesystem::path(data_dir()) / "cache" / "hints.cereal").string(), std::ios::binary); cereal::BinaryOutputArchive archive(file); HintsCerealData cd { ids }; try @@ -84,7 +86,7 @@ void read_used_binary(std::vector& ids) BOOST_LOG_TRIVIAL(warning) << "Failed to load to hints.cereal. File does not exists. " << path.string(); return; } - boost::filesystem::ifstream file(path); + boost::nowide::ifstream file(path.string()); cereal::BinaryInputArchive archive(file); HintsCerealData cd; try diff --git a/tests/fff_print/test_data.cpp b/tests/fff_print/test_data.cpp index 32e31c264c..f7077007db 100644 --- a/tests/fff_print/test_data.cpp +++ b/tests/fff_print/test_data.cpp @@ -11,6 +11,7 @@ #include #include +#include #include #include @@ -286,7 +287,7 @@ std::string gcode(Print & print) print.set_status_silent(); print.process(); print.export_gcode(temp.string(), nullptr, nullptr); - std::ifstream t(temp.string()); + boost::nowide::ifstream t(temp.string()); std::string str((std::istreambuf_iterator(t)), std::istreambuf_iterator()); boost::nowide::remove(temp.string().c_str()); return str;