Skip to content

Conversation

@alexgb0
Copy link
Contributor

@alexgb0 alexgb0 commented Oct 22, 2025

Fixes rlsw to be able to compile in C/C++.
Most of the problems comes from casting void* to something else, in the macros I had to move some variables declaration too.

Tested in win10 MSVC

Comment on lines +2592 to +2600
/* Pixel color computation */ \
float wRcp = 1.0f/w; \
float srcColor[4] = { \
color[0]*wRcp, \
color[1]*wRcp, \
color[2]*wRcp, \
color[3]*wRcp \
}; \
\
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this moved?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because the goto; it is illegal to bypass the initialization of a local variable in cpp. Even if it's not used.

@raysan5
Copy link
Owner

raysan5 commented Oct 23, 2025

@alexgb0 Added a review for some minor formatting changes

@alexgb0
Copy link
Contributor Author

alexgb0 commented Oct 23, 2025

Sorry, didn't pay attention

@raysan5 raysan5 merged commit 93c5dc3 into raysan5:master Oct 23, 2025
@raysan5
Copy link
Owner

raysan5 commented Oct 23, 2025

@alexgb0 Looks good, merging. Thanks for the review!

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.

3 participants