Skip to content
Snippets Groups Projects
Commit 7e585bce authored by Lioncash's avatar Lioncash
Browse files

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.
parent b8f5c71f
No related branches found
No related tags found
No related merge requests found
......@@ -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();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment