Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

memory/slab_heap: Make use of static_cast over reinterpret_cast

Lioncashac3ff8c9bad9
diff --git a/src/core/hle/kernel/memory/slab_heap.h b/src/core/hle/kernel/memory/slab_heap.h
index 049403e15d..be95fc3f78 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<Node*>(obj);
+ Node* node = static_cast<Node*>(obj);
Node* cur_head = head.load();
do {
@@ -145,7 +145,7 @@ public:
}
T* Allocate() {
- T* obj = reinterpret_cast<T*>(AllocateImpl());
+ T* obj = static_cast<T*>(AllocateImpl());
if (obj != nullptr) {
new (obj) T();
}