From ab03a10621562b85ea2bc66e514b66a2c3ccf423 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Thu, 15 Dec 2022 17:07:22 -0700 Subject: [PATCH] Use fstream from boost::nowide Fixes build on Boost 1.79.0. --- src/hints/HintsToPot.cpp | 2 +- src/libslic3r/utils.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hints/HintsToPot.cpp b/src/hints/HintsToPot.cpp index c93dc274c7..030d6aa9d3 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(std::move(path), std::ios_base::app); for (const auto& element : data) { //Example of .pot element diff --git a/src/libslic3r/utils.cpp b/src/libslic3r/utils.cpp index 5951b2217c..b4e6e42602 100644 --- a/src/libslic3r/utils.cpp +++ b/src/libslic3r/utils.cpp @@ -1405,7 +1405,7 @@ bool bbl_calc_md5(std::string &filename, std::string &md5_out) unsigned char digest[16]; MD5_CTX ctx; MD5_Init(&ctx); - boost::filesystem::ifstream ifs(filename, std::ios::binary); + boost::nowide::ifstream ifs(filename, std::ios::binary); std::string buf(64 * 1024, 0); const std::size_t & size = boost::filesystem::file_size(filename); std::size_t left_size = size;