From 6b7320add44bf3d933063d0b93296222fd522ef6 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 7 Dec 2020 22:00:34 -0500 Subject: 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. --- src/core/hle/service/apm/controller.cpp | 3 +-- src/core/hle/service/apm/interface.cpp | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'src/core/hle/service/apm') diff --git a/src/core/hle/service/apm/controller.cpp b/src/core/hle/service/apm/controller.cpp index ce993bad3..03636642b 100644 --- a/src/core/hle/service/apm/controller.cpp +++ b/src/core/hle/service/apm/controller.cpp @@ -48,8 +48,7 @@ void Controller::SetPerformanceConfiguration(PerformanceMode mode, [config](const auto& entry) { return entry.first == config; }); if (iter == config_to_speed.cend()) { - LOG_ERROR(Service_APM, "Invalid performance configuration value provided: {}", - static_cast(config)); + LOG_ERROR(Service_APM, "Invalid performance configuration value provided: {}", config); return; } diff --git a/src/core/hle/service/apm/interface.cpp b/src/core/hle/service/apm/interface.cpp index 89442e21e..298f6d520 100644 --- a/src/core/hle/service/apm/interface.cpp +++ b/src/core/hle/service/apm/interface.cpp @@ -28,8 +28,7 @@ private: const auto mode = rp.PopEnum(); const auto config = rp.PopEnum(); - LOG_DEBUG(Service_APM, "called mode={} config={}", static_cast(mode), - static_cast(config)); + LOG_DEBUG(Service_APM, "called mode={} config={}", mode, config); controller.SetPerformanceConfiguration(mode, config); @@ -41,7 +40,7 @@ private: IPC::RequestParser rp{ctx}; const auto mode = rp.PopEnum(); - LOG_DEBUG(Service_APM, "called mode={}", static_cast(mode)); + LOG_DEBUG(Service_APM, "called mode={}", mode); IPC::ResponseBuilder rb{ctx, 3}; rb.Push(RESULT_SUCCESS); @@ -111,7 +110,7 @@ void APM_Sys::SetCpuBoostMode(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const auto mode = rp.PopEnum(); - LOG_DEBUG(Service_APM, "called, mode={:08X}", static_cast(mode)); + LOG_DEBUG(Service_APM, "called, mode={:08X}", mode); controller.SetFromCpuBoostMode(mode); -- cgit v1.2.3