You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Most of the warnings were about unaligned memory access. Such access is not a problem on platforms we care about (an exception being 32 bit ARM and int64's, but we memcpy those already). As such we can use a memcpy() to remove the undefined behaviour and still have the compiler output decent instructions (in >= Development variants). This unfortunately semantically unlinks the structs, but comments have been left should anyone go splunking. New-Event event writes are already on two-byte boundaries or less, so aligning them up to two bytes in size maintains alignment. Lastly, UBSAN warns about how TraceLog plays hard and fast with the rules to cast arbitrary pointers to certain types in order to implement the UE_TRACE_LOG() API. We can use C++17's std::launder to communicate intent to the compiler. #rb cm #rnx #preflight 635ba2224710dd6af89520cd [CL 22826416 by Martin Ridgers in ue5-main branch]