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 too many opening parens in src/rtextures.c #2398

Merged
merged 1 commit into from
Mar 18, 2022

Conversation

joaotavora
Copy link
Contributor

This is a tiny change that makes code in src/rtextures.c "fold"
correctly in editors/IDE's by matching the number of opening
parenthesis to closing parenthesis. One of those editors is Emacs ;-)

@raysan5
Copy link
Owner

raysan5 commented Mar 18, 2022

@joaotavora I prefer to keep the if( next to the condition, an empty if( floating around looks quite confusing to me. Maybe there is a better way to implement it... I'll take a look.

This is a tiny change that makes code in src/rtextures.c "fold"
correctly in editors/IDE's by matching the number of opening
parenthesis to closing parenthesis.  One of those editors is Emacs ;-)
@joaotavora
Copy link
Contributor Author

joaotavora commented Mar 18, 2022

@raysan5 hehe it's not like that if is very easy to read right now, right? ;-) I pushed a "better" version, hopefully. Have a look (no more empty floating if()

I just need for the total amount of opening parenthesis to be balanced with the total amount of closing parenthesis.

image

This is what it looks like when you collapse the 25-line long very large if condition for readability.

@joaotavora
Copy link
Contributor Author

Thanks for your wonderful project, by the way ❤️ 👍

@raysan5 raysan5 merged commit 9ecbc46 into raysan5:master Mar 18, 2022
@raysan5
Copy link
Owner

raysan5 commented Mar 18, 2022

@joaotavora Nice! Way better solution! Thanks for the review! Glad you like raylib! :D

@joaotavora
Copy link
Contributor Author

yup, it's better now 🎉 . Thanks for merging.

I'm going to work on another much larger PR now, though I'm not too sure you'll like it too much, as I'm very new to this project. we'll see 😄

@raysan5
Copy link
Owner

raysan5 commented Mar 18, 2022

@joaotavora I prefer small fixes than large PR with new features, actually, I usually reject big new features

@joaotavora
Copy link
Contributor Author

I usually reject big new features

Yes, I read the contributing.md file. Totally understandable and fine. The feature I'll try to implement, run-time automatic atlassing, is self-contained. If it's a wished-for feature, then the implementation can be made "as small as possible, but not smaller" 😆

If it's not a wished-for feature, then I'll keep it in my fork. Totally fine, too.

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