aboutsummaryrefslogtreecommitdiff
path: root/src/base/io
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-11-15 16:43:25 +0800
committerYuqian Yang <crupest@crupest.life>2025-11-16 00:01:49 +0800
commit246eb9266b9349b44cbe96f3f839124ab30cbb89 (patch)
tree31604c8a4764d3a601d56599e56c98d91bd97758 /src/base/io
parentb92aa78ac19476049ab881b49c51b1a970a4a973 (diff)
downloadcru-246eb9266b9349b44cbe96f3f839124ab30cbb89.tar.gz
cru-246eb9266b9349b44cbe96f3f839124ab30cbb89.tar.bz2
cru-246eb9266b9349b44cbe96f3f839124ab30cbb89.zip
Impl win subprocess.
Diffstat (limited to 'src/base/io')
-rw-r--r--src/base/io/Base.cpp (renamed from src/base/io/OpenFileFlag.cpp)2
-rw-r--r--src/base/io/Stream.cpp24
2 files changed, 13 insertions, 13 deletions
diff --git a/src/base/io/OpenFileFlag.cpp b/src/base/io/Base.cpp
index 47069b29..d591336a 100644
--- a/src/base/io/OpenFileFlag.cpp
+++ b/src/base/io/Base.cpp
@@ -1,4 +1,4 @@
-#include "cru/base/io/OpenFileFlag.h"
+#include "cru/base/io/Base.h"
namespace cru::io {
bool CheckOpenFileFlag(OpenFileFlag flags) {
diff --git a/src/base/io/Stream.cpp b/src/base/io/Stream.cpp
index 56db547a..c7286241 100644
--- a/src/base/io/Stream.cpp
+++ b/src/base/io/Stream.cpp
@@ -115,32 +115,32 @@ void Stream::Flush() {
}
bool Stream::DoCanSeek() {
- if (supported_operations_->can_seek) {
- return *supported_operations_->can_seek;
+ if (supported_operations_.can_seek) {
+ return *supported_operations_.can_seek;
} else {
throw Exception(
- "Can seek is neither set in supported_operations nor implemeted in "
- "virtual function.");
+ "Can seek is neither set in supported_operations nor overriden by "
+ "derived class.");
}
}
bool Stream::DoCanRead() {
- if (supported_operations_->can_read) {
- return *supported_operations_->can_read;
+ if (supported_operations_.can_read) {
+ return *supported_operations_.can_read;
} else {
throw Exception(
- "Can read is neither set in supported_operations nor implemeted in "
- "virtual function.");
+ "Can read is neither set in supported_operations nor overriden by "
+ "derived class.");
}
}
bool Stream::DoCanWrite() {
- if (supported_operations_->can_write) {
- return *supported_operations_->can_write;
+ if (supported_operations_.can_write) {
+ return *supported_operations_.can_write;
} else {
throw Exception(
- "Can write is neither set in supported_operations nor implemeted in "
- "virtual function.");
+ "Can write is neither set in supported_operations nor overriden by "
+ "derived class.");
}
}