Fixed Windows/MSVC compilation.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include "./stream.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cassert>
|
||||
#include <limits>
|
||||
|
||||
@@ -143,6 +144,9 @@ StreamError FileStream::open(const char* path, FileOpenMode mode_)
|
||||
case FileOpenMode::READ_WRITE:
|
||||
modeStr = "r+b";
|
||||
break;
|
||||
default:
|
||||
MIJIN_FATAL("Invalid value for mode.");
|
||||
return StreamError::UNKNOWN_ERROR;
|
||||
}
|
||||
handle = std::fopen(path, modeStr); // NOLINT(cppcoreguidelines-owning-memory)
|
||||
if (!handle && mode_ == FileOpenMode::READ_WRITE) {
|
||||
|
||||
Reference in New Issue
Block a user