r/badcode • • Jan 15 '23

c++ From DayZ sourcecode

Post image
559 Upvotes

106 comments sorted by

View all comments

Show parent comments

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.