From 7660d782e08192666d9b6a498ab1abd538343aff Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Thu, 20 Jun 2019 21:49:40 -0700 Subject: [PATCH] ipc: accept any u32 convertible as command id --- include/stratosphere/ipc/ipc_serialization.hpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/include/stratosphere/ipc/ipc_serialization.hpp b/include/stratosphere/ipc/ipc_serialization.hpp index e69dd991..abd698b3 100644 --- a/include/stratosphere/ipc/ipc_serialization.hpp +++ b/include/stratosphere/ipc/ipc_serialization.hpp @@ -650,26 +650,24 @@ constexpr Result WrapIpcCommandImpl(IpcResponseContext *ctx) { } -template +template inline static constexpr ServiceCommandMeta MakeServiceCommandMeta() { return { .fw_low = l, .fw_high = h, - .cmd_id = c, + .cmd_id = static_cast(c), .handler = WrapIpcCommandImpl, }; }; -template +template inline static constexpr ServiceCommandMeta MakeServiceCommandMetaEx() { return { .fw_low = l, .fw_high = h, - .cmd_id = c, + .cmd_id = static_cast(c), .handler = WrapIpcCommandImpl, }; }; - - #pragma GCC diagnostic pop