aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/io/MemoryStream.cpp2
-rw-r--r--src/common/io/Stream.cpp2
-rw-r--r--src/common/io/UnixFileStream.cpp2
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) {