-
Notifications
You must be signed in to change notification settings - Fork 611
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
Struct Returns #1574
Struct Returns #1574
Conversation
src/code/z_camera.c
Outdated
@@ -464,10 +458,10 @@ Vec3s* Camera_GetBgCamFuncData(Camera* camera) { | |||
*/ | |||
s32 Camera_GetBgCamIndex(Camera* camera, s32* bgId, CollisionPoly* poly) { | |||
s32 bgCamIndex; | |||
PosRot playerPosRot; | |||
UNUSED PosRot playerPosRot; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't use unused in oot so far #1321
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's worth noting that the are already 3 uses of UNUSED
in z_camera.c, and that a lot of warnings are added without the UNUSED
. But I'll leave it to that PR to sort out, so I've removed them
pr looks good to me after a couple pending comments are addressed |
One of the rare instances where changing the number of arguments retains the same codegen. There's a pattern where a struct-returning functions takes an out-pointer as first arg and also return that pointer. Both seem to match but it seems likely that it was the first given the redundancy of having both an arg and a return give a pointer for a destination. See zeldaret/mm#1466 and the conversation here https://discord.com/channels/688807550715560050/688851997352263820/1170905743566835836
This also revealed some more unused variables, which has
UNUSED
added to them