Use fstream from boost::nowide

Fixes build on Boost 1.79.0.
This commit is contained in:
Zhaofeng Li 2022-12-15 17:07:22 -07:00 committed by SoftFever
parent a30361ec69
commit ab03a10621
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@
bool write_to_pot(boost::filesystem::path path, const std::vector<std::pair<std::string, std::string>>& data) 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(std::move(path), std::ios_base::app);
for (const auto& element : data) for (const auto& element : data)
{ {
//Example of .pot element //Example of .pot element

View File

@ -1405,7 +1405,7 @@ bool bbl_calc_md5(std::string &filename, std::string &md5_out)
unsigned char digest[16]; unsigned char digest[16];
MD5_CTX ctx; MD5_CTX ctx;
MD5_Init(&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); std::string buf(64 * 1024, 0);
const std::size_t & size = boost::filesystem::file_size(filename); const std::size_t & size = boost::filesystem::file_size(filename);
std::size_t left_size = size; std::size_t left_size = size;