mirror of
				https://git.suyu.dev/suyu/suyu
				synced 2025-10-28 22:49:02 -05:00 
			
		
		
		
	Merge pull request #3711 from lioncash/cast
memory/slab_heap: Make use of static_cast over reinterpret_cast
This commit is contained in:
		| @@ -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(); | ||||
|         } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 bunnei
					bunnei