[teagba] Change a reinterpret_cast to bit_cast
This commit is contained in:
		
							
								
								
									
										2
									
								
								deps/teagba/src/gfx.cpp
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								deps/teagba/src/gfx.cpp
									
									
									
									
										vendored
									
									
								
							| @@ -33,7 +33,7 @@ void applySpriteUpdates() noexcept { | |||||||
| 	const unsigned updates = g_spriteUpdates; | 	const unsigned updates = g_spriteUpdates; | ||||||
| 	for (unsigned i = 0; i < updates; ++i) { | 	for (unsigned i = 0; i < updates; ++i) { | ||||||
| 		const auto &oa = g_spriteBuffer[i]; | 		const auto &oa = g_spriteBuffer[i]; | ||||||
| 		MEM_OAM[oa.idx] = *reinterpret_cast<const uint64_t*>(&oa); | 		MEM_OAM[oa.idx] = std::bit_cast<uint64_t>(oa); | ||||||
| 	} | 	} | ||||||
| 	g_spriteUpdates = 0; | 	g_spriteUpdates = 0; | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user