mirror of
https://github.com/PabloMK7/citra.git
synced 2025-10-11 20:10:03 +00:00
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. Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
This commit is contained in:
parent
3f13e1cc24
commit
da908a9ed1
36 changed files with 136 additions and 162 deletions
|
@ -68,7 +68,7 @@ void Module::Interface::Initialize(Kernel::HLERequestContext& ctx) {
|
|||
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
if (nfc->nfc_tag_state != TagState::NotInitialized) {
|
||||
LOG_ERROR(Service_NFC, "Invalid TagState {}", static_cast<int>(nfc->nfc_tag_state));
|
||||
LOG_ERROR(Service_NFC, "Invalid TagState {}", nfc->nfc_tag_state);
|
||||
rb.Push(ResultCode(ErrCodes::CommandInvalidForState, ErrorModule::NFC,
|
||||
ErrorSummary::InvalidState, ErrorLevel::Status));
|
||||
return;
|
||||
|
@ -114,7 +114,7 @@ void Module::Interface::StartTagScanning(Kernel::HLERequestContext& ctx) {
|
|||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
if (nfc->nfc_tag_state != TagState::NotScanning &&
|
||||
nfc->nfc_tag_state != TagState::TagOutOfRange) {
|
||||
LOG_ERROR(Service_NFC, "Invalid TagState {}", static_cast<int>(nfc->nfc_tag_state));
|
||||
LOG_ERROR(Service_NFC, "Invalid TagState {}", nfc->nfc_tag_state);
|
||||
rb.Push(ResultCode(ErrCodes::CommandInvalidForState, ErrorModule::NFC,
|
||||
ErrorSummary::InvalidState, ErrorLevel::Status));
|
||||
return;
|
||||
|
@ -132,7 +132,7 @@ void Module::Interface::GetTagInfo(Kernel::HLERequestContext& ctx) {
|
|||
|
||||
if (nfc->nfc_tag_state != TagState::TagInRange &&
|
||||
nfc->nfc_tag_state != TagState::TagDataLoaded && nfc->nfc_tag_state != TagState::Unknown6) {
|
||||
LOG_ERROR(Service_NFC, "Invalid TagState {}", static_cast<int>(nfc->nfc_tag_state));
|
||||
LOG_ERROR(Service_NFC, "Invalid TagState {}", nfc->nfc_tag_state);
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
rb.Push(ResultCode(ErrCodes::CommandInvalidForState, ErrorModule::NFC,
|
||||
ErrorSummary::InvalidState, ErrorLevel::Status));
|
||||
|
@ -179,7 +179,7 @@ void Module::Interface::StopTagScanning(Kernel::HLERequestContext& ctx) {
|
|||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
if (nfc->nfc_tag_state == TagState::NotInitialized ||
|
||||
nfc->nfc_tag_state == TagState::NotScanning) {
|
||||
LOG_ERROR(Service_NFC, "Invalid TagState {}", static_cast<int>(nfc->nfc_tag_state));
|
||||
LOG_ERROR(Service_NFC, "Invalid TagState {}", nfc->nfc_tag_state);
|
||||
rb.Push(ResultCode(ErrCodes::CommandInvalidForState, ErrorModule::NFC,
|
||||
ErrorSummary::InvalidState, ErrorLevel::Status));
|
||||
return;
|
||||
|
@ -208,7 +208,7 @@ void Module::Interface::ResetTagScanState(Kernel::HLERequestContext& ctx) {
|
|||
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
if (nfc->nfc_tag_state != TagState::TagDataLoaded && nfc->nfc_tag_state != TagState::Unknown6) {
|
||||
LOG_ERROR(Service_NFC, "Invalid TagState {}", static_cast<int>(nfc->nfc_tag_state));
|
||||
LOG_ERROR(Service_NFC, "Invalid TagState {}", nfc->nfc_tag_state);
|
||||
rb.Push(ResultCode(ErrCodes::CommandInvalidForState, ErrorModule::NFC,
|
||||
ErrorSummary::InvalidState, ErrorLevel::Status));
|
||||
return;
|
||||
|
@ -225,7 +225,7 @@ void Module::Interface::GetTagInRangeEvent(Kernel::HLERequestContext& ctx) {
|
|||
IPC::RequestParser rp(ctx, 0x0B, 0, 0);
|
||||
|
||||
if (nfc->nfc_tag_state != TagState::NotScanning) {
|
||||
LOG_ERROR(Service_NFC, "Invalid TagState {}", static_cast<int>(nfc->nfc_tag_state));
|
||||
LOG_ERROR(Service_NFC, "Invalid TagState {}", nfc->nfc_tag_state);
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
rb.Push(ResultCode(ErrCodes::CommandInvalidForState, ErrorModule::NFC,
|
||||
ErrorSummary::InvalidState, ErrorLevel::Status));
|
||||
|
@ -242,7 +242,7 @@ void Module::Interface::GetTagOutOfRangeEvent(Kernel::HLERequestContext& ctx) {
|
|||
IPC::RequestParser rp(ctx, 0x0C, 0, 0);
|
||||
|
||||
if (nfc->nfc_tag_state != TagState::NotScanning) {
|
||||
LOG_ERROR(Service_NFC, "Invalid TagState {}", static_cast<int>(nfc->nfc_tag_state));
|
||||
LOG_ERROR(Service_NFC, "Invalid TagState {}", nfc->nfc_tag_state);
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
rb.Push(ResultCode(ErrCodes::CommandInvalidForState, ErrorModule::NFC,
|
||||
ErrorSummary::InvalidState, ErrorLevel::Status));
|
||||
|
@ -278,7 +278,7 @@ void Module::Interface::Unknown0x1A(Kernel::HLERequestContext& ctx) {
|
|||
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
if (nfc->nfc_tag_state != TagState::TagInRange) {
|
||||
LOG_ERROR(Service_NFC, "Invalid TagState {}", static_cast<int>(nfc->nfc_tag_state));
|
||||
LOG_ERROR(Service_NFC, "Invalid TagState {}", nfc->nfc_tag_state);
|
||||
rb.Push(ResultCode(ErrCodes::CommandInvalidForState, ErrorModule::NFC,
|
||||
ErrorSummary::InvalidState, ErrorLevel::Status));
|
||||
return;
|
||||
|
@ -294,7 +294,7 @@ void Module::Interface::GetIdentificationBlock(Kernel::HLERequestContext& ctx) {
|
|||
IPC::RequestParser rp(ctx, 0x1B, 0, 0);
|
||||
|
||||
if (nfc->nfc_tag_state != TagState::TagDataLoaded && nfc->nfc_tag_state != TagState::Unknown6) {
|
||||
LOG_ERROR(Service_NFC, "Invalid TagState {}", static_cast<int>(nfc->nfc_tag_state));
|
||||
LOG_ERROR(Service_NFC, "Invalid TagState {}", nfc->nfc_tag_state);
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
rb.Push(ResultCode(ErrCodes::CommandInvalidForState, ErrorModule::NFC,
|
||||
ErrorSummary::InvalidState, ErrorLevel::Status));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue