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

Tweaks #77

merged 2 commits into from Feb 28, 2017


Copy link

Mystro256 commented Feb 18, 2017

First commit looks to be a typo, as the loop iterates one extra time. I would think the check and break should prevent unintentionally dereferencing recent_accel out of bounds (i.e. if i=10), but it could call recent->FindItem once redundantly.

Second commit is using the prefix ++ operator for non-primitive variables with unused return values, as this could yield better performance. Depending on how smart the compiler is, this may not do anything, as when the return value is unused, a smart compiler would optimise out the opt codes that store and return of the variables previous value in the case of a post ++ op.

Mystro256 added 2 commits Feb 18, 2017
Typically yields better or equal performance. Sometimes compilers don't
optimizer out keeping the previous values (not needed for only adding 1)

This comment has been minimized.

Copy link

rkitover commented Feb 28, 2017

@Mystro256 sorry this didn't register in my brain when I looked at it last, merging it now.

@rkitover rkitover merged commit fa1e13e into visualboyadvance-m:master Feb 28, 2017
rkitover pushed a commit that referenced this pull request Aug 18, 2019
Add missing break; lines for switch statements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.