From e27c1bd1f5afd34418c09321700055e9af3a7770 Mon Sep 17 00:00:00 2001 From: NarcolepticK Date: Tue, 7 Aug 2018 13:45:11 -0400 Subject: [PATCH] service/cecd: Addressed comment about PopEnum --- src/core/hle/service/cecd/cecd.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/core/hle/service/cecd/cecd.cpp b/src/core/hle/service/cecd/cecd.cpp index c003e547a..eb4aaca66 100644 --- a/src/core/hle/service/cecd/cecd.cpp +++ b/src/core/hle/service/cecd/cecd.cpp @@ -27,7 +27,7 @@ using CecSystemInfoType = Module::CecSystemInfoType; void Module::Interface::OpenRawFile(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp(ctx, 0x01, 3, 2); const u32 ncch_program_id = rp.Pop(); - const auto path_type = static_cast(rp.Pop()); + const CecDataPathType path_type = rp.PopEnum(); CecOpenMode open_mode; open_mode.raw = rp.Pop(); rp.PopPID(); @@ -243,7 +243,7 @@ void Module::Interface::WriteMessageWithHMAC(Kernel::HLERequestContext& ctx) { void Module::Interface::Delete(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp(ctx, 0x08, 4, 2); const u32 ncch_program_id = rp.Pop(); - const auto path_type = static_cast(rp.Pop()); + const CecDataPathType path_type = rp.PopEnum(); const bool is_outbox = rp.Pop(); const u32 message_id_size = rp.Pop(); auto& message_id_buffer = rp.PopMappedBuffer(); @@ -276,7 +276,7 @@ void Module::Interface::Cecd_0x000900C2(Kernel::HLERequestContext& ctx) { void Module::Interface::GetSystemInfo(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp(ctx, 0x0A, 3, 4); const u32 dest_buffer_size = rp.Pop(); - const CecSystemInfoType info_type = static_cast(rp.Pop()); + const CecSystemInfoType info_type = rp.PopEnum(); const u32 param_buffer_size = rp.Pop(); auto& param_buffer = rp.PopMappedBuffer(); auto& dest_buffer = rp.PopMappedBuffer(); @@ -313,7 +313,7 @@ void Module::Interface::GetSystemInfo(Kernel::HLERequestContext& ctx) { void Module::Interface::RunCommand(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp(ctx, 0x0B, 1, 0); - const auto command = static_cast(rp.Pop()); + const CecCommand command = rp.PopEnum(); IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); rb.Push(RESULT_SUCCESS); @@ -323,7 +323,7 @@ void Module::Interface::RunCommand(Kernel::HLERequestContext& ctx) { void Module::Interface::RunCommandAlt(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp(ctx, 0x0C, 1, 0); - const auto command = static_cast(rp.Pop()); + const CecCommand command = rp.PopEnum(); IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); rb.Push(RESULT_SUCCESS); @@ -365,7 +365,7 @@ void Module::Interface::OpenAndWrite(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp(ctx, 0x11, 4, 4); const u32 buffer_size = rp.Pop(); const u32 ncch_program_id = rp.Pop(); - const auto path_type = static_cast(rp.Pop()); + const CecDataPathType path_type = rp.PopEnum(); CecOpenMode open_mode; open_mode.raw = rp.Pop(); rp.PopPID(); @@ -415,7 +415,7 @@ void Module::Interface::OpenAndRead(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp(ctx, 0x12, 4, 4); const u32 buffer_size = rp.Pop(); const u32 ncch_program_id = rp.Pop(); - const auto path_type = static_cast(rp.Pop()); + const CecDataPathType path_type = rp.PopEnum(); CecOpenMode open_mode; open_mode.raw = rp.Pop(); rp.PopPID();