diff options
author | crupest <crupest@outlook.com> | 2022-01-15 18:45:05 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-01-15 18:45:05 +0800 |
commit | abb9d48a72e2d580d6bfbfcb600795c5ec66e204 (patch) | |
tree | 15d89cb51270533e4a8d1e52f437fa371bdb34a6 /src/common | |
parent | b6757b263ed304aed22eb2a472805f87bfb67f3a (diff) | |
download | cru-abb9d48a72e2d580d6bfbfcb600795c5ec66e204.tar.gz cru-abb9d48a72e2d580d6bfbfcb600795c5ec66e204.tar.bz2 cru-abb9d48a72e2d580d6bfbfcb600795c5ec66e204.zip |
...
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/io/MemoryStream.cpp | 2 | ||||
-rw-r--r-- | src/common/io/Stream.cpp | 2 | ||||
-rw-r--r-- | src/common/io/UnixFileStream.cpp | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/src/common/io/MemoryStream.cpp b/src/common/io/MemoryStream.cpp index e3c9c605..bd561f5d 100644 --- a/src/common/io/MemoryStream.cpp +++ b/src/common/io/MemoryStream.cpp @@ -49,6 +49,4 @@ Index MemoryStream::Write(const std::byte *buffer, Index offset, Index size) { position_ += size; return size; } - -void MemoryStream::Flush() {} } // namespace cru::io diff --git a/src/common/io/Stream.cpp b/src/common/io/Stream.cpp index 1a39b653..7c30406f 100644 --- a/src/common/io/Stream.cpp +++ b/src/common/io/Stream.cpp @@ -19,5 +19,7 @@ Index Stream::Write(const std::byte* buffer, Index size) { return Write(buffer, 0, size); } +void Stream::Flush() {} + void Stream::Close() {} } // namespace cru::io diff --git a/src/common/io/UnixFileStream.cpp b/src/common/io/UnixFileStream.cpp index 23c11dad..4fa61b7b 100644 --- a/src/common/io/UnixFileStream.cpp +++ b/src/common/io/UnixFileStream.cpp @@ -53,6 +53,8 @@ int MapSeekOrigin(Stream::SeekOrigin origin) { } } // namespace +UnixFileStream::~UnixFileStream() { Close(); } + UnixFileStream::UnixFileStream(String path, OpenFileFlag flags) { file_descriptor_ = ::open(path.ToUtf8().c_str(), MapOpenFileFlag(flags)); if (file_descriptor_ == -1) { |