diff options
author | Lioncash <mathew1800@gmail.com> | 2019-02-25 09:53:18 -0500 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-02-25 09:53:21 -0500 |
commit | 0220862ba576851e8140516d2c34a5f8540e64f2 (patch) | |
tree | 77317aa5cf45917f41dcf9a4137d1f99e56fd363 /src | |
parent | c07987dfab78e32a14ea3cb883f71323c99ad034 (diff) |
kernel/handle_table: Resolve truncation warnings
Avoids implicit truncation warnings from u32 -> u16 (the truncation is
desirable behavior here).
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hle/kernel/handle_table.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<u16>(handle >> 15); } constexpr u16 GetGeneration(Handle handle) { - return handle & 0x7FFF; + return static_cast<u16>(handle & 0x7FFF); } } // Anonymous namespace |