summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2020-04-17 19:38:57 -0400
committerGravatar Lioncash2020-04-17 19:38:59 -0400
commit7e585bce28fb00cc28be07258429a688295c7433 (patch)
tree23099f8514c99ae1cfb5028d54dda03e95e72238 /src
parentMerge pull request #3666 from bunnei/new-vmm (diff)
downloadyuzu-7e585bce28fb00cc28be07258429a688295c7433.tar.gz
yuzu-7e585bce28fb00cc28be07258429a688295c7433.tar.xz
yuzu-7e585bce28fb00cc28be07258429a688295c7433.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/memory/slab_heap.h4
1 files changed, 2 insertions, 2 deletions
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:
51 } 51 }
52 52
53 void Free(void* obj) { 53 void Free(void* obj) {
54 Node* node = reinterpret_cast<Node*>(obj); 54 Node* node = static_cast<Node*>(obj);
55 55
56 Node* cur_head = head.load(); 56 Node* cur_head = head.load();
57 do { 57 do {
@@ -145,7 +145,7 @@ public:
145 } 145 }
146 146
147 T* Allocate() { 147 T* Allocate() {
148 T* obj = reinterpret_cast<T*>(AllocateImpl()); 148 T* obj = static_cast<T*>(AllocateImpl());
149 if (obj != nullptr) { 149 if (obj != nullptr) {
150 new (obj) T(); 150 new (obj) T();
151 } 151 }