mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-12 06:58:17 -05:00
kernel/handle_table: Resolve truncation warnings
Avoids implicit truncation warnings from u32 -> u16 (the truncation is desirable behavior here).
This commit is contained in:
@ -14,11 +14,11 @@
|
|||||||
namespace Kernel {
|
namespace Kernel {
|
||||||
namespace {
|
namespace {
|
||||||
constexpr u16 GetSlot(Handle handle) {
|
constexpr u16 GetSlot(Handle handle) {
|
||||||
return handle >> 15;
|
return static_cast<u16>(handle >> 15);
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr u16 GetGeneration(Handle handle) {
|
constexpr u16 GetGeneration(Handle handle) {
|
||||||
return handle & 0x7FFF;
|
return static_cast<u16>(handle & 0x7FFF);
|
||||||
}
|
}
|
||||||
} // Anonymous namespace
|
} // Anonymous namespace
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user