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

Level.loadTiles does not need a label. #6

Open
JustGregory-zz opened this issue Jan 16, 2017 · 0 comments
Open

Level.loadTiles does not need a label. #6

JustGregory-zz opened this issue Jan 16, 2017 · 0 comments

Comments

@JustGregory-zz
Copy link

JustGregory-zz commented Jan 16, 2017

Just for correctness' sake, @2D-Game-Engine/src/ca/vanzeben/game/level/Level.java (specifically the loadTiles method) does not actully need the given line-label, as breaking from the innermost for loop would actually do the very same thing anyway. It's only necessary if you were to have additional code after that inner for-loop but before proceeding to the middle for-loop iteration.

Recommendation: take the label reference and the label itself out of the method. A break; call will function as expected anyway.

(I didn't look yet for other instances of the same thing; however, there may be similar optimizations that can be performed.

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

No branches or pull requests

1 participant