diff options
author | Subv <subv2112@gmail.com> | 2015-02-01 21:31:21 +0100 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2015-02-12 15:25:35 +0100 |
commit | 8e2b248e05c99c9cf505a351bc9234cedd5fa3b4 (patch) | |
tree | 05f18714a93d28999c259f4cd86c261deaf659b2 /src/core/hle/kernel | |
parent | Merge pull request #384 from neobrain/vertex_shader_debugger (diff) | |
download | yuzu-8e2b248e05c99c9cf505a351bc9234cedd5fa3b4.tar yuzu-8e2b248e05c99c9cf505a351bc9234cedd5fa3b4.tar.gz yuzu-8e2b248e05c99c9cf505a351bc9234cedd5fa3b4.tar.bz2 yuzu-8e2b248e05c99c9cf505a351bc9234cedd5fa3b4.tar.lz yuzu-8e2b248e05c99c9cf505a351bc9234cedd5fa3b4.tar.xz yuzu-8e2b248e05c99c9cf505a351bc9234cedd5fa3b4.tar.zst yuzu-8e2b248e05c99c9cf505a351bc9234cedd5fa3b4.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/kernel.cpp | 4 | ||||
-rw-r--r-- | src/core/hle/kernel/kernel.h | 2 | ||||
-rw-r--r-- | src/core/hle/kernel/timer.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index eb61d8ef3..498b2ec98 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -96,7 +96,7 @@ ResultCode HandleTable::Close(Handle handle) { if (!IsValid(handle)) return ERR_INVALID_HANDLE; - size_t slot = GetSlot(handle); + u16 slot = GetSlot(handle); objects[slot] = nullptr; @@ -127,7 +127,7 @@ SharedPtr<Object> HandleTable::GetGeneric(Handle handle) const { } void HandleTable::Clear() { - for (size_t i = 0; i < MAX_COUNT; ++i) { + for (u16 i = 0; i < MAX_COUNT; ++i) { generations[i] = i + 1; objects[i] = nullptr; } diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h index 4d8e388b6..2d295ea00 100644 --- a/src/core/hle/kernel/kernel.h +++ b/src/core/hle/kernel/kernel.h @@ -253,7 +253,7 @@ private: */ static const size_t MAX_COUNT = 4096; - static size_t GetSlot(Handle handle) { return handle >> 15; } + static u16 GetSlot(Handle handle) { return handle >> 15; } static u16 GetGeneration(Handle handle) { return handle & 0x7FFF; } /// Stores the Object referenced by the handle or null if the slot is empty. diff --git a/src/core/hle/kernel/timer.cpp b/src/core/hle/kernel/timer.cpp index aa0afb796..610e26a3c 100644 --- a/src/core/hle/kernel/timer.cpp +++ b/src/core/hle/kernel/timer.cpp @@ -63,7 +63,7 @@ void Timer::Clear() { /// The timer callback event, called when a timer is fired static void TimerCallback(u64 timer_handle, int cycles_late) { - SharedPtr<Timer> timer = timer_callback_handle_table.Get<Timer>(timer_handle); + SharedPtr<Timer> timer = timer_callback_handle_table.Get<Timer>(static_cast<Handle>(timer_handle)); if (timer == nullptr) { LOG_CRITICAL(Kernel, "Callback fired for invalid timer %08X", timer_handle); |