diff options
| author | 2020-12-07 22:00:34 -0500 | |
|---|---|---|
| committer | 2020-12-07 23:02:23 -0500 | |
| commit | 6b7320add44bf3d933063d0b93296222fd522ef6 (patch) | |
| tree | 06cb434947232a7105e955a8237285a15ac5556b /src/core/frontend | |
| parent | Merge pull request #5164 from lioncash/contains (diff) | |
| download | yuzu-6b7320add44bf3d933063d0b93296222fd522ef6.tar.gz yuzu-6b7320add44bf3d933063d0b93296222fd522ef6.tar.xz yuzu-6b7320add44bf3d933063d0b93296222fd522ef6.zip | |
core: Remove unnecessary enum casts in log calls
Follows the video core PR. fmt doesn't require casts for enum classes
anymore, so we can remove quite a few casts.
Diffstat (limited to 'src/core/frontend')
| -rw-r--r-- | src/core/frontend/applets/error.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/frontend/applets/error.cpp b/src/core/frontend/applets/error.cpp index 4002a9211..dceb20ff8 100644 --- a/src/core/frontend/applets/error.cpp +++ b/src/core/frontend/applets/error.cpp | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include "common/logging/log.h" | ||
| 5 | #include "core/frontend/applets/error.h" | 6 | #include "core/frontend/applets/error.h" |
| 6 | 7 | ||
| 7 | namespace Core::Frontend { | 8 | namespace Core::Frontend { |
| @@ -10,7 +11,7 @@ ErrorApplet::~ErrorApplet() = default; | |||
| 10 | 11 | ||
| 11 | void DefaultErrorApplet::ShowError(ResultCode error, std::function<void()> finished) const { | 12 | void DefaultErrorApplet::ShowError(ResultCode error, std::function<void()> finished) const { |
| 12 | LOG_CRITICAL(Service_Fatal, "Application requested error display: {:04}-{:04} (raw={:08X})", | 13 | LOG_CRITICAL(Service_Fatal, "Application requested error display: {:04}-{:04} (raw={:08X})", |
| 13 | static_cast<u32>(error.module.Value()), error.description.Value(), error.raw); | 14 | error.module.Value(), error.description.Value(), error.raw); |
| 14 | } | 15 | } |
| 15 | 16 | ||
| 16 | void DefaultErrorApplet::ShowErrorWithTimestamp(ResultCode error, std::chrono::seconds time, | 17 | void DefaultErrorApplet::ShowErrorWithTimestamp(ResultCode error, std::chrono::seconds time, |
| @@ -18,7 +19,7 @@ void DefaultErrorApplet::ShowErrorWithTimestamp(ResultCode error, std::chrono::s | |||
| 18 | LOG_CRITICAL( | 19 | LOG_CRITICAL( |
| 19 | Service_Fatal, | 20 | Service_Fatal, |
| 20 | "Application requested error display: {:04X}-{:04X} (raw={:08X}) with timestamp={:016X}", | 21 | "Application requested error display: {:04X}-{:04X} (raw={:08X}) with timestamp={:016X}", |
| 21 | static_cast<u32>(error.module.Value()), error.description.Value(), error.raw, time.count()); | 22 | error.module.Value(), error.description.Value(), error.raw, time.count()); |
| 22 | } | 23 | } |
| 23 | 24 | ||
| 24 | void DefaultErrorApplet::ShowCustomErrorText(ResultCode error, std::string main_text, | 25 | void DefaultErrorApplet::ShowCustomErrorText(ResultCode error, std::string main_text, |
| @@ -26,7 +27,7 @@ void DefaultErrorApplet::ShowCustomErrorText(ResultCode error, std::string main_ | |||
| 26 | std::function<void()> finished) const { | 27 | std::function<void()> finished) const { |
| 27 | LOG_CRITICAL(Service_Fatal, | 28 | LOG_CRITICAL(Service_Fatal, |
| 28 | "Application requested custom error with error_code={:04X}-{:04X} (raw={:08X})", | 29 | "Application requested custom error with error_code={:04X}-{:04X} (raw={:08X})", |
| 29 | static_cast<u32>(error.module.Value()), error.description.Value(), error.raw); | 30 | error.module.Value(), error.description.Value(), error.raw); |
| 30 | LOG_CRITICAL(Service_Fatal, " Main Text: {}", main_text); | 31 | LOG_CRITICAL(Service_Fatal, " Main Text: {}", main_text); |
| 31 | LOG_CRITICAL(Service_Fatal, " Detail Text: {}", detail_text); | 32 | LOG_CRITICAL(Service_Fatal, " Detail Text: {}", detail_text); |
| 32 | } | 33 | } |