forked from eden-emu/eden
		
	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.
This commit is contained in:
		
							parent
							
								
									66cb8ee64f
								
							
						
					
					
						commit
						ac3ff8c9ba
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -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(); | ||||
|         } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lioncash
						Lioncash