Why does UE4 use uint32 to represent a bool? What’s the advantage of using uint32 vs bool?
i think you’ll find they use bitfields alot and the uint32 is used in the bitfield to ensure alignment boundries. it helps make the memory faster to access because its aligned. http://msdn.microsoft.com/en-us/library/ewwyfdbe.aspx
You should not add unreal code (this is engine code and not your sample code) to a public forum, you might violate the license agreement.
Now to the questio ^^. Using a bit field saves you a lot of runtime memory, the same can be achieved using a union like: http://www.rightcorner.com/code/CPP/Basic/union/sample.php
IANAL, but I believe you are allowed to post up to 30 lines.
and network bandwidth.
It doesn’t, it just affects how they’re stored. How you pack them in your bit stream is unrelated, you could pack a boolean (8-bit) as 1-bit on the network stream.
Ah thats nice Good to know when posting samples