aboutsummaryrefslogtreecommitdiff
path: root/include/cru/base/io/Stream.h
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-09-07 03:34:56 +0800
committerYuqian Yang <crupest@crupest.life>2025-09-07 03:34:56 +0800
commit20123151d12a0b01453ab6a36c84e4d3e5ea9504 (patch)
tree27543f3e5bf6430298c94c38bad6ecc83dafdd47 /include/cru/base/io/Stream.h
parent227118866190a7fe17b42e8c589c475781c69f33 (diff)
downloadcru-20123151d12a0b01453ab6a36c84e4d3e5ea9504.tar.gz
cru-20123151d12a0b01453ab6a36c84e4d3e5ea9504.tar.bz2
cru-20123151d12a0b01453ab6a36c84e4d3e5ea9504.zip
Remove some usage of my format.
Diffstat (limited to 'include/cru/base/io/Stream.h')
-rw-r--r--include/cru/base/io/Stream.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/cru/base/io/Stream.h b/include/cru/base/io/Stream.h
index 0965cf22..2f02a8c2 100644
--- a/include/cru/base/io/Stream.h
+++ b/include/cru/base/io/Stream.h
@@ -10,12 +10,16 @@
namespace cru::io {
class CRU_BASE_API StreamOperationNotSupportedException : public Exception {
public:
- explicit StreamOperationNotSupportedException(String operation);
-
- CRU_DEFAULT_DESTRUCTOR(StreamOperationNotSupportedException)
+ explicit StreamOperationNotSupportedException(StringView operation);
+ explicit StreamOperationNotSupportedException(std::string operation);
public:
- String GetOperation() const { return operation_; }
+ [[deprecated("Use GetOperationUtf8 instead.")]]
+ String GetOperation() const {
+ return String::FromUtf8(operation_);
+ }
+
+ std::string GetOperationUtf8() const { return operation_; }
public:
static void CheckSeek(bool seekable);
@@ -23,7 +27,7 @@ class CRU_BASE_API StreamOperationNotSupportedException : public Exception {
static void CheckWrite(bool writable);
private:
- String operation_;
+ std::string operation_;
};
class CRU_BASE_API StreamClosedException : public Exception {