-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
project: Use pragma pack and remove static_assert spam #773
base: main
Are you sure you want to change the base?
Conversation
Talking with @RoyalBlue1 in vc about this and we kinda agree that in regards to the That being said we should still do the pragma pack part ofc. Maybe splice from the PR so that we can merge it early? ^^ |
The size mismatch is because the northstar class is wrong ( see CPlayer ) . While for basic classes the
The
No :P, this is already split as i didnt want it to be too large. |
I think the reasoning @RoyalBlue1 and I had in regards to the I don't really hold too strong of an opinion there other than that I prefer to be overly cautious with checks to assert assumptions early to prevent weird behaviour caused by broken assumptions. I'll leave the discussion up between the two of you ^^ |
I'd argue that they can be removed for cases where we have mapped out all (or the vast majority) of the members. Member offsets accidentally being changed is much more likely to happen when we have huge unk gaps between members |
Imo we have code review to catch these kinds of errors. If we enforce the Also anything from datamaps doesnt need offset checks at all as it was given to us by the game (eg CPlayer). |
I am against removing static_asserts as someone who did a good deal of effort to convince people to add them in the first place xD there's no reason not to have them honestly, and they'll save you in times you might not even expect. Even for fully mapped classes I wouldn't be comfortable removing those, various unexpected things can happen, too many to just cross one's fingers that everything is always gonna be as we expect. Rule of thumb should be, if you need any offset of any member to match up with something in existing game's code, have a static assert for it... |
Only removes the
static_assert
spam, doesn't fix any wonky classes.