diff --git a/src/qoibench.cpp b/src/qoibench.cpp index c2e9bbf..2e5ade5 100644 --- a/src/qoibench.cpp +++ b/src/qoibench.cpp @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include diff --git a/src/qoiconv.cpp b/src/qoiconv.cpp index 84f8824..3f7819c 100644 --- a/src/qoiconv.cpp +++ b/src/qoiconv.cpp @@ -35,13 +35,13 @@ static inline std::vector load_file(const std::filesystem::path& path){ std::vector bytes(std::filesystem::file_size(path)); - std::ifstream ifs{path}; + std::ifstream ifs{path, std::ios::binary}; ifs.read(reinterpret_cast(bytes.data()), bytes.size()); return bytes; } static inline void save_file(const std::filesystem::path& path, const std::vector& bytes){ - std::ofstream ofs{path}; + std::ofstream ofs{path, std::ios::binary}; ofs.write(reinterpret_cast(bytes.data()), bytes.size()); }