update libslic3r

This commit is contained in:
QIDI TECH
2025-08-04 10:13:51 +08:00
parent e3f49c2fb5
commit 8d4d60ec48
96 changed files with 4993 additions and 1903 deletions

View File

@@ -1517,5 +1517,23 @@ bool qdt_calc_md5(std::string &filename, std::string &md5_out)
return true;
}
void save_string_file(const boost::filesystem::path& p, const std::string& str)
{
boost::nowide::ofstream file;
file.exceptions(std::ios_base::failbit | std::ios_base::badbit);
file.open(p.generic_string(), std::ios_base::binary);
file.write(str.c_str(), str.size());
}
void load_string_file(const boost::filesystem::path& p, std::string& str)
{
boost::nowide::ifstream file;
file.exceptions(std::ios_base::failbit | std::ios_base::badbit);
file.open(p.generic_string(), std::ios_base::binary);
std::size_t sz = static_cast<std::size_t>(boost::filesystem::file_size(p));
str.resize(sz, '\0');
file.read(&str[0], sz);
}
}; // namespace Slic3r