From 20123151d12a0b01453ab6a36c84e4d3e5ea9504 Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Sun, 7 Sep 2025 03:34:56 +0800 Subject: Remove some usage of my format. --- include/cru/base/io/Stream.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'include/cru/base/io/Stream.h') 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 { -- cgit v1.2.3