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

Code tidy-up (reduce unnecessary if statements in for loops) #85

Closed
wants to merge 1 commit into from
Closed

Code tidy-up (reduce unnecessary if statements in for loops) #85

wants to merge 1 commit into from

Conversation

kleinebre
Copy link

In this file I noticed a for loop counting from 0..columns and subsequently doing nothing at index 0. In other words the loop spent doing a good number of unnecessary checks just because the starting point wasn't right.

I went over the rest of the file as well to further reduce unnecessary if statements inside loops which should enhance code efficiency, albeit sometimes at the cost of (partially) repeating code. I imagine speed may not be the top priority in this particular file, in which case no worries, but just pointing out that initial weirdness.

@liabru liabru closed this in 0a73a64 May 20, 2015
@liabru
Copy link
Owner

liabru commented May 20, 2015

Thanks for the heads up but I feel your fix was a bit over-complicated for this, so I've done something simpler.

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