Explorar o código

Merge pull request #3711 from lioncash/cast

memory/slab_heap: Make use of static_cast over reinterpret_cast
bunnei %!s(int64=6) %!d(string=hai) anos
pai
achega
90ddb13372
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/core/hle/kernel/memory/slab_heap.h

+ 2 - 2
src/core/hle/kernel/memory/slab_heap.h

@@ -51,7 +51,7 @@ public:
     }
     }
 
 
     void Free(void* obj) {
     void Free(void* obj) {
-        Node* node = reinterpret_cast<Node*>(obj);
+        Node* node = static_cast<Node*>(obj);
 
 
         Node* cur_head = head.load();
         Node* cur_head = head.load();
         do {
         do {
@@ -145,7 +145,7 @@ public:
     }
     }
 
 
     T* Allocate() {
     T* Allocate() {
-        T* obj = reinterpret_cast<T*>(AllocateImpl());
+        T* obj = static_cast<T*>(AllocateImpl());
         if (obj != nullptr) {
         if (obj != nullptr) {
             new (obj) T();
             new (obj) T();
         }
         }