mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 15:37:30 -06:00
Feature/update deps (#3445)
* update deps
* fix win build errors
* fix mac build
* update linux
(cherry picked from commit 77b6225060
)
This commit is contained in:
parent
1ea33f0919
commit
9d59cd66c4
16 changed files with 67 additions and 227 deletions
|
@ -1527,4 +1527,22 @@ void copy_directory_recursively(const boost::filesystem::path &source, const boo
|
|||
return;
|
||||
}
|
||||
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue