From 0220862ba576851e8140516d2c34a5f8540e64f2 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 25 Feb 2019 09:53:18 -0500 Subject: kernel/handle_table: Resolve truncation warnings Avoids implicit truncation warnings from u32 -> u16 (the truncation is desirable behavior here). --- src/core/hle/kernel/handle_table.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/hle/kernel/handle_table.cpp') diff --git a/src/core/hle/kernel/handle_table.cpp b/src/core/hle/kernel/handle_table.cpp index c8acde5b1..a30038dca 100644 --- a/src/core/hle/kernel/handle_table.cpp +++ b/src/core/hle/kernel/handle_table.cpp @@ -14,11 +14,11 @@ namespace Kernel { namespace { constexpr u16 GetSlot(Handle handle) { - return handle >> 15; + return static_cast(handle >> 15); } constexpr u16 GetGeneration(Handle handle) { - return handle & 0x7FFF; + return static_cast(handle & 0x7FFF); } } // Anonymous namespace -- cgit v1.2.3