Skip to content
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

Fix Matrix4::operator[] annotation #1390

Merged
merged 2 commits into from
Feb 22, 2025

Conversation

foxtacles
Copy link
Member

@foxtacles foxtacles commented Feb 21, 2025

This fixes the BETA annotation of Matrix4::operator[], which was previously annotated as MxMatrix::operator[] const. The best place to verify that this is correct is LegoView1::Create, since it accesses both a Matrix4 and MxMatrix.

In consequence, several function parameters and members which were previously MxMatrix were changed to be of type Matrix4 instead. Matches of affected functions stay the same. (but plenty of entropy in the code base as usual)

@foxtacles foxtacles requested a review from jonschz February 21, 2025 21:49
Copy link
Collaborator

@jonschz jonschz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks correct to me. Good catch with Lego1View::Create!

Have you checked all other instances where an MxMatrix may be referenced by pointer (e.g. LegoAnimationManager::FUN_100609f0)? I guess it will be impossible to tell for some.

@foxtacles
Copy link
Member Author

This looks correct to me. Good catch with Lego1View::Create!

Have you checked all other instances where an MxMatrix may be referenced by pointer (e.g. LegoAnimationManager::FUN_100609f0)? I guess it will be impossible to tell for some.

I've only checked the instances of where the BETA operator[]'s are used to reconcile the annotations. There might be more instances of incorrect types but like you said, it might be impossible to know in some cases

@foxtacles foxtacles merged commit ea5a722 into isledecomp:master Feb 22, 2025
12 checks passed
@foxtacles foxtacles deleted the fix-matrix-annotation branch February 22, 2025 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants