From a7d9be13840acd65d0d684666390758ede72c826 Mon Sep 17 00:00:00 2001 From: german77 Date: Sat, 25 Jun 2022 22:44:19 -0500 Subject: core: Replace all instances of ResultCode with Result --- src/core/hle/service/bcat/backend/backend.cpp | 2 +- src/core/hle/service/bcat/backend/backend.h | 4 ++-- src/core/hle/service/bcat/bcat_module.cpp | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/core/hle/service/bcat') diff --git a/src/core/hle/service/bcat/backend/backend.cpp b/src/core/hle/service/bcat/backend/backend.cpp index 7e6d16230..cd0b405ff 100644 --- a/src/core/hle/service/bcat/backend/backend.cpp +++ b/src/core/hle/service/bcat/backend/backend.cpp @@ -74,7 +74,7 @@ void ProgressServiceBackend::CommitDirectory(std::string_view dir_name) { SignalUpdate(); } -void ProgressServiceBackend::FinishDownload(ResultCode result) { +void ProgressServiceBackend::FinishDownload(Result result) { impl.total_downloaded_bytes = impl.total_bytes; impl.status = DeliveryCacheProgressImpl::Status::Done; impl.result = result; diff --git a/src/core/hle/service/bcat/backend/backend.h b/src/core/hle/service/bcat/backend/backend.h index 7e8026c75..205ed0702 100644 --- a/src/core/hle/service/bcat/backend/backend.h +++ b/src/core/hle/service/bcat/backend/backend.h @@ -49,7 +49,7 @@ struct DeliveryCacheProgressImpl { }; Status status; - ResultCode result = ResultSuccess; + Result result = ResultSuccess; DirectoryName current_directory; FileName current_file; s64 current_downloaded_bytes; ///< Bytes downloaded on current file. @@ -90,7 +90,7 @@ public: void CommitDirectory(std::string_view dir_name); // Notifies the application that the operation completed with result code result. - void FinishDownload(ResultCode result); + void FinishDownload(Result result); private: explicit ProgressServiceBackend(Core::System& system, std::string_view event_name); diff --git a/src/core/hle/service/bcat/bcat_module.cpp b/src/core/hle/service/bcat/bcat_module.cpp index 076fd79e7..d928e37fb 100644 --- a/src/core/hle/service/bcat/bcat_module.cpp +++ b/src/core/hle/service/bcat/bcat_module.cpp @@ -18,15 +18,15 @@ namespace Service::BCAT { -constexpr ResultCode ERROR_INVALID_ARGUMENT{ErrorModule::BCAT, 1}; -constexpr ResultCode ERROR_FAILED_OPEN_ENTITY{ErrorModule::BCAT, 2}; -constexpr ResultCode ERROR_ENTITY_ALREADY_OPEN{ErrorModule::BCAT, 6}; -constexpr ResultCode ERROR_NO_OPEN_ENTITY{ErrorModule::BCAT, 7}; +constexpr Result ERROR_INVALID_ARGUMENT{ErrorModule::BCAT, 1}; +constexpr Result ERROR_FAILED_OPEN_ENTITY{ErrorModule::BCAT, 2}; +constexpr Result ERROR_ENTITY_ALREADY_OPEN{ErrorModule::BCAT, 6}; +constexpr Result ERROR_NO_OPEN_ENTITY{ErrorModule::BCAT, 7}; // The command to clear the delivery cache just calls fs IFileSystem DeleteFile on all of the files // and if any of them have a non-zero result it just forwards that result. This is the FS error code // for permission denied, which is the closest approximation of this scenario. -constexpr ResultCode ERROR_FAILED_CLEAR_CACHE{ErrorModule::FS, 6400}; +constexpr Result ERROR_FAILED_CLEAR_CACHE{ErrorModule::FS, 6400}; using BCATDigest = std::array; -- cgit v1.2.3