From 7e585bce28fb00cc28be07258429a688295c7433 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 17 Apr 2020 19:38:57 -0400 Subject: memory/slab_heap: Make use of static_cast over reinterpret_cast Casting from void* with static_cast is permitted by the standard, so we can just make use of that instead. --- src/core/hle/kernel/memory/slab_heap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/core/hle/kernel/memory/slab_heap.h b/src/core/hle/kernel/memory/slab_heap.h index 049403e15..be95fc3f7 100644 --- a/src/core/hle/kernel/memory/slab_heap.h +++ b/src/core/hle/kernel/memory/slab_heap.h @@ -51,7 +51,7 @@ public: } void Free(void* obj) { - Node* node = reinterpret_cast(obj); + Node* node = static_cast(obj); Node* cur_head = head.load(); do { @@ -145,7 +145,7 @@ public: } T* Allocate() { - T* obj = reinterpret_cast(AllocateImpl()); + T* obj = static_cast(AllocateImpl()); if (obj != nullptr) { new (obj) T(); } -- cgit v1.2.3