Explorar o código

kernel/handle_table: Resolve truncation warnings

Avoids implicit truncation warnings from u32 -> u16 (the truncation is
desirable behavior here).
Lioncash %!s(int64=7) %!d(string=hai) anos
pai
achega
0220862ba5
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/core/hle/kernel/handle_table.cpp

+ 2 - 2
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<u16>(handle >> 15);
 }
 
 constexpr u16 GetGeneration(Handle handle) {
-    return handle & 0x7FFF;
+    return static_cast<u16>(handle & 0x7FFF);
 }
 } // Anonymous namespace