2D-Game-Engine icon indicating copy to clipboard operation
2D-Game-Engine copied to clipboard

Level.loadTiles does not need a label.

Open JustGregory-zz opened this issue 8 years ago • 0 comments

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.

JustGregory-zz avatar Jan 16 '17 20:01 JustGregory-zz