Date: Wednesday, November 9, 2022 @ 02:11:53 Author: svenstaro Revision: 1346071
upgpkg: prusa-slicer 2.5.0-3: Check in patches as upstream patches keep changing Added: prusa-slicer/trunk/prusa-slicer-boost-1.73.patch prusa-slicer/trunk/prusa-slicer-boost-1.79-p1.patch prusa-slicer/trunk/prusa-slicer-boost-1.79-p2.patch prusa-slicer/trunk/prusa-slicer-boost-1.79-p3.patch prusa-slicer/trunk/prusa-slicer-fix-lcereal-p1.patch prusa-slicer/trunk/prusa-slicer-fix-lcereal-p2.patch prusa-slicer/trunk/prusa-slicer-uniqueptr.patch Modified: prusa-slicer/trunk/PKGBUILD -----------------------------------+ PKGBUILD | 14 ++--- prusa-slicer-boost-1.73.patch | 60 +++++++++++++++++++++++++ prusa-slicer-boost-1.79-p1.patch | 81 +++++++++++++++++++++++++++++++++ prusa-slicer-boost-1.79-p2.patch | 31 ++++++++++++ prusa-slicer-boost-1.79-p3.patch | 64 ++++++++++++++++++++++++++ prusa-slicer-fix-lcereal-p1.patch | 66 +++++++++++++++++++++++++++ prusa-slicer-fix-lcereal-p2.patch | 70 +++++++++++++++++++++++++++++ prusa-slicer-uniqueptr.patch | 86 ++++++++++++++++++++++++++++++++++++ 8 files changed, 465 insertions(+), 7 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2022-11-09 00:48:44 UTC (rev 1346070) +++ PKGBUILD 2022-11-09 02:11:53 UTC (rev 1346071) @@ -4,7 +4,7 @@ pkgbase=prusa-slicer pkgname=(prusa-slicer slicer-udev) pkgver=2.5.0 -pkgrel=2 +pkgrel=3 pkgdesc="G-code generator for 3D printers (Prusa fork of Slic3r)" arch=(x86_64) url="https://github.com/prusa3d/PrusaSlicer" @@ -21,12 +21,12 @@ _wxcommit=489f6118256853cf5b299d595868641938566cdb source=(${url}/archive/version_${pkgver}/${pkgname}-${pkgver}.tar.gz https://github.com/prusa3d/wxWidgets/archive/${_wxcommit}/wxWidgets-${_wxcommit}.tar.gz - ${pkgname}-fix-lcereal-p1.patch::${url}/commit/0ffcfd8393457fd035576436752267c9a1e6bbcc.patch - ${pkgname}-fix-lcereal-p2.patch::${url}/commit/cc788ebb643b6d4048f3550235ac3e9d3697ada0.patch - ${pkgname}-boost-1.79-p1.patch::${url}/commit/408e56f0390f20aaf793e0aa0c70c4d9544401d4.patch - ${pkgname}-boost-1.79-p2.patch::${url}/commit/926ae0471800abd1e5335e251a5934570eb8f6ff.patch - ${pkgname}-boost-1.79-p3.patch::${url}/commit/436a454b2e5dc823c6a878b836f82f56922e8834.patch - ${pkgname}-uniqueptr.patch::${url}/commit/4b686af12db49500205ca15038fb7d651ccc4295.patch + ${pkgname}-fix-lcereal-p1.patch + ${pkgname}-fix-lcereal-p2.patch + ${pkgname}-boost-1.79-p1.patch + ${pkgname}-boost-1.79-p2.patch + ${pkgname}-boost-1.79-p3.patch + ${pkgname}-uniqueptr.patch use-system-catch2.patch) sha256sums=('dbbf3e10c812d1dc7bae4bd6879e60f864d763b2738b099dd34b9636d0e5eb6a' 'b4f0f6aea13b779e87c227dd7a062a6c2af4cad2f4e92b1272e43e2d45eedf51' Added: prusa-slicer-boost-1.73.patch =================================================================== --- prusa-slicer-boost-1.73.patch (rev 0) +++ prusa-slicer-boost-1.73.patch 2022-11-09 02:11:53 UTC (rev 1346071) @@ -0,0 +1,60 @@ +From 3a194f91871684b5fc8c6c78300b87e0ee1cb610 Mon Sep 17 00:00:00 2001 +From: Megidd <[email protected]> +Date: Mon, 21 Sep 2020 18:00:52 +0330 +Subject: [PATCH] Replace deprecated Boost header in "admesh" + +--- + src/admesh/stlinit.cpp | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/src/admesh/stlinit.cpp b/src/admesh/stlinit.cpp +index 390fe56a40..6aa2c44177 100644 +--- a/src/admesh/stlinit.cpp ++++ b/src/admesh/stlinit.cpp +@@ -28,7 +28,7 @@ + + #include <boost/log/trivial.hpp> + #include <boost/nowide/cstdio.hpp> +-#include <boost/detail/endian.hpp> ++#include <boost/predef/other/endian.h> + + #include "stl.h" + +@@ -36,9 +36,9 @@ + #error "SEEK_SET not defined" + #endif + +-#ifndef BOOST_LITTLE_ENDIAN ++#if BOOST_ENDIAN_BIG_BYTE + extern void stl_internal_reverse_quads(char *buf, size_t cnt); +-#endif /* BOOST_LITTLE_ENDIAN */ ++#endif /* BOOST_ENDIAN_BIG_BYTE */ + + static FILE* stl_open_count_facets(stl_file *stl, const char *file) + { +@@ -89,10 +89,10 @@ static FILE* stl_open_count_facets(stl_file *stl, const char *file) + // Read the int following the header. This should contain # of facets. + uint32_t header_num_facets; + bool header_num_faces_read = fread(&header_num_facets, sizeof(uint32_t), 1, fp) != 0; +-#ifndef BOOST_LITTLE_ENDIAN ++#if BOOST_ENDIAN_BIG_BYTE + // Convert from little endian to big endian. + stl_internal_reverse_quads((char*)&header_num_facets, 4); +-#endif /* BOOST_LITTLE_ENDIAN */ ++#endif /* BOOST_ENDIAN_BIG_BYTE */ + if (! header_num_faces_read || num_facets != header_num_facets) + BOOST_LOG_TRIVIAL(info) << "stl_open_count_facets: Warning: File size doesn't match number of facets in the header: " << file; + } +@@ -158,10 +158,10 @@ static bool stl_read(stl_file *stl, FILE *fp, int first_facet, bool first) + // Read a single facet from a binary .STL file. We assume little-endian architecture! + if (fread(&facet, 1, SIZEOF_STL_FACET, fp) != SIZEOF_STL_FACET) + return false; +-#ifndef BOOST_LITTLE_ENDIAN ++#if BOOST_ENDIAN_BIG_BYTE + // Convert the loaded little endian data to big endian. + stl_internal_reverse_quads((char*)&facet, 48); +-#endif /* BOOST_LITTLE_ENDIAN */ ++#endif /* BOOST_ENDIAN_BIG_BYTE */ + } else { + // Read a single facet from an ASCII .STL file + // skip solid/endsolid Added: prusa-slicer-boost-1.79-p1.patch =================================================================== --- prusa-slicer-boost-1.79-p1.patch (rev 0) +++ prusa-slicer-boost-1.79-p1.patch 2022-11-09 02:11:53 UTC (rev 1346071) @@ -0,0 +1,81 @@ +From 408e56f0390f20aaf793e0aa0c70c4d9544401d4 Mon Sep 17 00:00:00 2001 +From: Vojtech Bubnik <[email protected]> +Date: Mon, 25 Apr 2022 08:33:48 +0200 +Subject: [PATCH] Fix of Boost 1.79 deprecated boost::filesystem::ofstream + #8238 Replacing boost::filesystem::fstream with boost::nowide::fstream + variants with the unfortunate cost of string path conversion on Windows from + 16 bits to UTF8 and back to 16 bits. + +Unfortunately we cannot use std::filesystem yet as it is missing +on older MACs and because the interface is crooked minefield on Windows +see https://github.com/microsoft/STL/issues/909 +--- + src/hints/HintsToPot.cpp | 2 +- + src/libslic3r/Preset.cpp | 2 +- + src/slic3r/GUI/HintNotification.cpp | 8 +++++--- + 3 files changed, 7 insertions(+), 5 deletions(-) + +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<std::pair<std::string, std::string>>& 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/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 <map> ++ + #include <boost/algorithm/string/replace.hpp> + #include <boost/filesystem.hpp> + #include <boost/nowide/fstream.hpp> + #include <boost/log/trivial.hpp> + #include <boost/property_tree/ini_parser.hpp> +-#include <map> ++ + #include <cereal/archives/binary.hpp> + #include <cereal/types/string.hpp> + #include <cereal/types/vector.hpp> +@@ -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<std::string>& 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<std::string>& 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 Added: prusa-slicer-boost-1.79-p2.patch =================================================================== --- prusa-slicer-boost-1.79-p2.patch (rev 0) +++ prusa-slicer-boost-1.79-p2.patch 2022-11-09 02:11:53 UTC (rev 1346071) @@ -0,0 +1,31 @@ +From 926ae0471800abd1e5335e251a5934570eb8f6ff Mon Sep 17 00:00:00 2001 +From: Vojtech Bubnik <[email protected]> +Date: Mon, 25 Apr 2022 11:32:03 +0200 +Subject: [PATCH] Follow-up to 408e56f0390f20aaf793e0aa0c70c4d9544401d4 Fixing + compilation of tests on latest GCC/boost + +--- + tests/fff_print/test_data.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +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 <string> + + #include <boost/nowide/cstdio.hpp> ++#include <boost/nowide/fstream.hpp> + #include <boost/filesystem.hpp> + #include <libslic3r/ModelArrange.hpp> + +@@ -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<char>(t)), std::istreambuf_iterator<char>()); + boost::nowide::remove(temp.string().c_str()); + return str; Added: prusa-slicer-boost-1.79-p3.patch =================================================================== --- prusa-slicer-boost-1.79-p3.patch (rev 0) +++ prusa-slicer-boost-1.79-p3.patch 2022-11-09 02:11:53 UTC (rev 1346071) @@ -0,0 +1,64 @@ +From 436a454b2e5dc823c6a878b836f82f56922e8834 Mon Sep 17 00:00:00 2001 +From: KARBOWSKI Piotr <[email protected]> +Date: Mon, 9 May 2022 10:35:50 +0200 +Subject: [PATCH] Fix building with new Boost 1.79.0. + +Fixes #8302 +--- + src/slic3r/GUI/DesktopIntegrationDialog.cpp | 3 ++- + src/slic3r/GUI/GUI_App.cpp | 1 + + src/slic3r/Utils/AppUpdater.cpp | 3 ++- + 3 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/slic3r/GUI/DesktopIntegrationDialog.cpp b/src/slic3r/GUI/DesktopIntegrationDialog.cpp +index 81c681bc3a..7f99a505c6 100644 +--- a/src/slic3r/GUI/DesktopIntegrationDialog.cpp ++++ b/src/slic3r/GUI/DesktopIntegrationDialog.cpp +@@ -10,6 +10,7 @@ + #include "libslic3r/Platform.hpp" + #include "libslic3r/Config.hpp" + ++#include <boost/nowide/fstream.hpp> + #include <boost/filesystem.hpp> + #include <boost/log/trivial.hpp> + #include <boost/dll/runtime_symbol_info.hpp> +@@ -503,4 +504,4 @@ DesktopIntegrationDialog::~DesktopIntegrationDialog() + + } // namespace GUI + } // namespace Slic3r +-#endif // __linux__ +\ No newline at end of file ++#endif // __linux__ +diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp +index 8533854f4d..4435f836b3 100644 +--- a/src/slic3r/GUI/GUI_App.cpp ++++ b/src/slic3r/GUI/GUI_App.cpp +@@ -13,6 +13,7 @@ + #include <cstdlib> + #include <regex> + #include <string_view> ++#include <boost/nowide/fstream.hpp> + #include <boost/algorithm/string/predicate.hpp> + #include <boost/algorithm/string.hpp> + #include <boost/format.hpp> +diff --git a/src/slic3r/Utils/AppUpdater.cpp b/src/slic3r/Utils/AppUpdater.cpp +index 60739ccb39..80f31f69f7 100644 +--- a/src/slic3r/Utils/AppUpdater.cpp ++++ b/src/slic3r/Utils/AppUpdater.cpp +@@ -5,6 +5,7 @@ + + #include <boost/filesystem.hpp> + #include <boost/log/trivial.hpp> ++#include <boost/nowide/fstream.hpp> + #include <boost/nowide/convert.hpp> + #include <boost/property_tree/ini_parser.hpp> + #include <curl/curl.h> +@@ -242,7 +243,7 @@ boost::filesystem::path AppUpdater::priv::download_file(const DownloadAppData& d + tmp_path += format(".%1%%2%", get_current_pid(), ".download"); + try + { +- boost::filesystem::fstream file(tmp_path, std::ios::out | std::ios::binary | std::ios::trunc); ++ boost::nowide::fstream file(tmp_path, std::ios::out | std::ios::binary | std::ios::trunc); + file.write(body.c_str(), body.size()); + file.close(); + boost::filesystem::rename(tmp_path, dest_path); Added: prusa-slicer-fix-lcereal-p1.patch =================================================================== --- prusa-slicer-fix-lcereal-p1.patch (rev 0) +++ prusa-slicer-fix-lcereal-p1.patch 2022-11-09 02:11:53 UTC (rev 1346071) @@ -0,0 +1,66 @@ +From 0ffcfd8393457fd035576436752267c9a1e6bbcc Mon Sep 17 00:00:00 2001 +From: Yuri D'Elia <[email protected]> +Date: Mon, 24 Jan 2022 20:21:24 +0100 +Subject: [PATCH] Use namespaces to link against libcereal >= 1.3.1 + +Create an alias for previous versions. +--- + CMakeLists.txt | 3 +++ + src/CMakeLists.txt | 2 +- + src/libslic3r/CMakeLists.txt | 2 +- + src/slic3r/CMakeLists.txt | 2 +- + 4 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 72fd87d224..ba458ec962 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -506,6 +506,9 @@ endif () + + # Find the Cereal serialization library + find_package(cereal REQUIRED) ++if (NOT TARGET cereal::cereal) ++ add_library(cereal::cereal ALIAS cereal) ++endif () + + # l10n + set(L10N_DIR "${SLIC3R_RESOURCES_DIR}/localization") +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index ab1c7b9645..bd5eb94a5e 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -126,7 +126,7 @@ if (NOT WIN32 AND NOT APPLE) + set_target_properties(PrusaSlicer PROPERTIES OUTPUT_NAME "prusa-slicer") + endif () + +-target_link_libraries(PrusaSlicer libslic3r cereal) ++target_link_libraries(PrusaSlicer libslic3r cereal::cereal) + + if (APPLE) + # add_compile_options(-stdlib=libc++) +diff --git a/src/libslic3r/CMakeLists.txt b/src/libslic3r/CMakeLists.txt +index 046aba7631..36344ebab9 100644 +--- a/src/libslic3r/CMakeLists.txt ++++ b/src/libslic3r/CMakeLists.txt +@@ -358,7 +358,7 @@ find_package(JPEG REQUIRED) + target_link_libraries(libslic3r + libnest2d + admesh +- cereal ++ cereal::cereal + libigl + miniz + boost_libs +diff --git a/src/slic3r/CMakeLists.txt b/src/slic3r/CMakeLists.txt +index 34c0efd014..b23db9867f 100644 +--- a/src/slic3r/CMakeLists.txt ++++ b/src/slic3r/CMakeLists.txt +@@ -270,7 +270,7 @@ endforeach() + + encoding_check(libslic3r_gui) + +-target_link_libraries(libslic3r_gui libslic3r avrdude cereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES}) ++target_link_libraries(libslic3r_gui libslic3r avrdude cereal::cereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES}) + + if (MSVC) + target_link_libraries(libslic3r_gui Setupapi.lib) Added: prusa-slicer-fix-lcereal-p2.patch =================================================================== --- prusa-slicer-fix-lcereal-p2.patch (rev 0) +++ prusa-slicer-fix-lcereal-p2.patch 2022-11-09 02:11:53 UTC (rev 1346071) @@ -0,0 +1,70 @@ +From cc788ebb643b6d4048f3550235ac3e9d3697ada0 Mon Sep 17 00:00:00 2001 +From: tamasmeszaros <[email protected]> +Date: Tue, 22 Feb 2022 11:36:27 +0100 +Subject: [PATCH] Fix and merge PR #7809 + +--- + CMakeLists.txt | 7 +++++-- + src/CMakeLists.txt | 2 +- + src/libslic3r/CMakeLists.txt | 2 +- + src/slic3r/CMakeLists.txt | 2 +- + 4 files changed, 8 insertions(+), 5 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ba458ec962..6c6afe6710 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -506,9 +506,12 @@ endif () + + # Find the Cereal serialization library + find_package(cereal REQUIRED) ++add_library(libcereal INTERFACE) + if (NOT TARGET cereal::cereal) +- add_library(cereal::cereal ALIAS cereal) +-endif () ++ target_link_libraries(libcereal INTERFACE cereal) ++else() ++ target_link_libraries(libcereal INTERFACE cereal::cereal) ++endif() + + # l10n + set(L10N_DIR "${SLIC3R_RESOURCES_DIR}/localization") +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index bd5eb94a5e..61a2a90d8b 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -126,7 +126,7 @@ if (NOT WIN32 AND NOT APPLE) + set_target_properties(PrusaSlicer PROPERTIES OUTPUT_NAME "prusa-slicer") + endif () + +-target_link_libraries(PrusaSlicer libslic3r cereal::cereal) ++target_link_libraries(PrusaSlicer libslic3r libcereal) + + if (APPLE) + # add_compile_options(-stdlib=libc++) +diff --git a/src/libslic3r/CMakeLists.txt b/src/libslic3r/CMakeLists.txt +index 36344ebab9..5e8d681f1a 100644 +--- a/src/libslic3r/CMakeLists.txt ++++ b/src/libslic3r/CMakeLists.txt +@@ -358,7 +358,7 @@ find_package(JPEG REQUIRED) + target_link_libraries(libslic3r + libnest2d + admesh +- cereal::cereal ++ libcereal + libigl + miniz + boost_libs +diff --git a/src/slic3r/CMakeLists.txt b/src/slic3r/CMakeLists.txt +index b23db9867f..022bba2a8a 100644 +--- a/src/slic3r/CMakeLists.txt ++++ b/src/slic3r/CMakeLists.txt +@@ -270,7 +270,7 @@ endforeach() + + encoding_check(libslic3r_gui) + +-target_link_libraries(libslic3r_gui libslic3r avrdude cereal::cereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES}) ++target_link_libraries(libslic3r_gui libslic3r avrdude libcereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES}) + + if (MSVC) + target_link_libraries(libslic3r_gui Setupapi.lib) Added: prusa-slicer-uniqueptr.patch =================================================================== --- prusa-slicer-uniqueptr.patch (rev 0) +++ prusa-slicer-uniqueptr.patch 2022-11-09 02:11:53 UTC (rev 1346071) @@ -0,0 +1,86 @@ +From 4b686af12db49500205ca15038fb7d651ccc4295 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hejl?= <[email protected]> +Date: Tue, 18 Oct 2022 01:23:47 +0200 +Subject: [PATCH] Fixed undefined behavior (dereferencing std::unique_ptr + pointing to nullptr) in the G-Code processing pipeline. + +--- + src/libslic3r/GCode.cpp | 36 ++++++++++++++++++------------------ + 1 file changed, 18 insertions(+), 18 deletions(-) + +diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp +index f8fc2e5a70..c74ee32ddb 100644 +--- a/src/libslic3r/GCode.cpp ++++ b/src/libslic3r/GCode.cpp +@@ -1551,27 +1551,27 @@ void GCode::process_layers( + } + }); + const auto spiral_vase = tbb::make_filter<LayerResult, LayerResult>(slic3r_tbb_filtermode::serial_in_order, +- [&spiral_vase = *this->m_spiral_vase](LayerResult in) -> LayerResult { ++ [spiral_vase = this->m_spiral_vase.get()](LayerResult in) -> LayerResult { + if (in.nop_layer_result) + return in; + +- spiral_vase.enable(in.spiral_vase_enable); +- return { spiral_vase.process_layer(std::move(in.gcode)), in.layer_id, in.spiral_vase_enable, in.cooling_buffer_flush}; ++ spiral_vase->enable(in.spiral_vase_enable); ++ return { spiral_vase->process_layer(std::move(in.gcode)), in.layer_id, in.spiral_vase_enable, in.cooling_buffer_flush}; + }); + const auto pressure_equalizer = tbb::make_filter<LayerResult, LayerResult>(slic3r_tbb_filtermode::serial_in_order, +- [&pressure_equalizer = *this->m_pressure_equalizer](LayerResult in) -> LayerResult { +- return pressure_equalizer.process_layer(std::move(in)); ++ [pressure_equalizer = this->m_pressure_equalizer.get()](LayerResult in) -> LayerResult { ++ return pressure_equalizer->process_layer(std::move(in)); + }); + const auto cooling = tbb::make_filter<LayerResult, std::string>(slic3r_tbb_filtermode::serial_in_order, +- [&cooling_buffer = *this->m_cooling_buffer](LayerResult in) -> std::string { ++ [cooling_buffer = this->m_cooling_buffer.get()](LayerResult in) -> std::string { + if (in.nop_layer_result) + return in.gcode; + +- return cooling_buffer.process_layer(std::move(in.gcode), in.layer_id, in.cooling_buffer_flush); ++ return cooling_buffer->process_layer(std::move(in.gcode), in.layer_id, in.cooling_buffer_flush); + }); + const auto find_replace = tbb::make_filter<std::string, std::string>(slic3r_tbb_filtermode::serial_in_order, +- [&self = *this->m_find_replace](std::string s) -> std::string { +- return self.process_layer(std::move(s)); ++ [find_replace = this->m_find_replace.get()](std::string s) -> std::string { ++ return find_replace->process_layer(std::move(s)); + }); + const auto output = tbb::make_filter<std::string, void>(slic3r_tbb_filtermode::serial_in_order, + [&output_stream](std::string s) { output_stream.write(s); } +@@ -1633,25 +1633,25 @@ void GCode::process_layers( + } + }); + const auto spiral_vase = tbb::make_filter<LayerResult, LayerResult>(slic3r_tbb_filtermode::serial_in_order, +- [&spiral_vase = *this->m_spiral_vase](LayerResult in)->LayerResult { ++ [spiral_vase = this->m_spiral_vase.get()](LayerResult in)->LayerResult { + if (in.nop_layer_result) + return in; +- spiral_vase.enable(in.spiral_vase_enable); +- return { spiral_vase.process_layer(std::move(in.gcode)), in.layer_id, in.spiral_vase_enable, in.cooling_buffer_flush }; ++ spiral_vase->enable(in.spiral_vase_enable); ++ return { spiral_vase->process_layer(std::move(in.gcode)), in.layer_id, in.spiral_vase_enable, in.cooling_buffer_flush }; + }); + const auto pressure_equalizer = tbb::make_filter<LayerResult, LayerResult>(slic3r_tbb_filtermode::serial_in_order, +- [&pressure_equalizer = *this->m_pressure_equalizer](LayerResult in) -> LayerResult { +- return pressure_equalizer.process_layer(std::move(in)); ++ [pressure_equalizer = this->m_pressure_equalizer.get()](LayerResult in) -> LayerResult { ++ return pressure_equalizer->process_layer(std::move(in)); + }); + const auto cooling = tbb::make_filter<LayerResult, std::string>(slic3r_tbb_filtermode::serial_in_order, +- [&cooling_buffer = *this->m_cooling_buffer](LayerResult in)->std::string { ++ [cooling_buffer = this->m_cooling_buffer.get()](LayerResult in)->std::string { + if (in.nop_layer_result) + return in.gcode; +- return cooling_buffer.process_layer(std::move(in.gcode), in.layer_id, in.cooling_buffer_flush); ++ return cooling_buffer->process_layer(std::move(in.gcode), in.layer_id, in.cooling_buffer_flush); + }); + const auto find_replace = tbb::make_filter<std::string, std::string>(slic3r_tbb_filtermode::serial_in_order, +- [&self = *this->m_find_replace](std::string s) -> std::string { +- return self.process_layer(std::move(s)); ++ [find_replace = this->m_find_replace.get()](std::string s) -> std::string { ++ return find_replace->process_layer(std::move(s)); + }); + const auto output = tbb::make_filter<std::string, void>(slic3r_tbb_filtermode::serial_in_order, + [&output_stream](std::string s) { output_stream.write(s); }
