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

Clean up the display modes parsing #1844

Merged
merged 2 commits into from
Nov 5, 2022

Conversation

tonihele
Copy link
Contributor

Heh, I had this sitting locally for some time. Might as well turn it in.

Basically it is cleanup. Changed loops to modern for each loops. Avoids some unnecessary string concatenations and other unnecessary operations especially when trying to get the depths. And changes the toArray calls to faster one (https://shipilev.net/blog/2016/arrays-wisdom-ancients/).

In all the data handled is so minuscule that I doubt there is anything noticeable in performance. But code might be a bit more readable with less nesting and using DisplayMode.BIT_DEPTH_MULTI instead of magically discarding "-1" from the depths...

@stephengold stephengold added this to the Future Release milestone Aug 17, 2022
@tonihele tonihele merged commit e2ded65 into jMonkeyEngine:master Nov 5, 2022
@tonihele tonihele deleted the settings-dialog branch November 5, 2022 17:15
@Ali-RS Ali-RS modified the milestones: Future Release, v3.6.0 Dec 31, 2022
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.

4 participants