diff options
Diffstat (limited to 'src/base/io/CFileStream.cpp')
-rw-r--r-- | src/base/io/CFileStream.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/base/io/CFileStream.cpp b/src/base/io/CFileStream.cpp index 45eb2eaf..f0d4790b 100644 --- a/src/base/io/CFileStream.cpp +++ b/src/base/io/CFileStream.cpp @@ -28,7 +28,7 @@ CFileStream::CFileStream(const char* path, const char* mode) file_(std::fopen(path, mode)), auto_close_(true) { if (file_ == nullptr) { - throw ErrnoException(u"Cannot open file."); + throw ErrnoException("Cannot open file."); } } @@ -36,7 +36,7 @@ CFileStream::CFileStream(std::FILE* file, bool readable, bool writable, bool auto_close) : Stream(true, readable, writable), file_(file), auto_close_(auto_close) { if (file_ == nullptr) { - throw Exception(u"File is NULL."); + throw Exception("File is NULL."); } } @@ -55,13 +55,13 @@ static int ConvertOriginFlag(Stream::SeekOrigin origin) { case Stream::SeekOrigin::End: return SEEK_END; default: - throw Exception(u"Unknown seek origin."); + throw Exception("Unknown seek origin."); } } Index CFileStream::DoSeek(Index offset, SeekOrigin origin) { if (std::fseek(file_, offset, ConvertOriginFlag(origin))) { - throw ErrnoException(u"Seek failed."); + throw ErrnoException("Seek failed."); } return DoTell(); } @@ -69,7 +69,7 @@ Index CFileStream::DoSeek(Index offset, SeekOrigin origin) { Index CFileStream::DoTell() { long position = std::ftell(file_); if (position == -1) { - throw ErrnoException(u"Tell failed."); + throw ErrnoException("Tell failed."); } return position; } @@ -91,7 +91,7 @@ void CFileStream::DoFlush() { std::fflush(file_); } void CFileStream::DoClose() { CRU_STREAM_BEGIN_CLOSE if (auto_close_ && !std::fclose(file_)) { - throw Exception(u"Failed to close FILE."); + throw Exception("Failed to close FILE."); } file_ = nullptr; } |