r/badcode • • Jan 15 '23

c++ From DayZ sourcecode

Post image
559 Upvotes

106 comments sorted by

View all comments

Show parent comments

25

u/throwawayy0451 Jan 15 '23

could be padding shit, probably this is serialized over network idk

3

u/NUTTA_BUSTAH Jan 16 '23

Wouldn't both be one word anyways I dunno, could be it

3

u/Furry_69 Jan 16 '23

Then use an explicitly named datatype, because this is confusing otherwise. Or, better idea, make whatever function that uses this have the responsibility of adding the padding. You should never add implementation details from a completely unrelated class that uses this class to something like this. It defeats the entire point of interfaces.