From: Ian Jackson Date: Sun, 9 Mar 2014 10:46:32 +0000 (+0000) Subject: move had_max and totalfrags update later in loop body (no functional change) X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=8953c0d75a973d1d0b011890904246f687a8b1e5;p=matchsticks-search.git move had_max and totalfrags update later in loop body (no functional change) --- diff --git a/main.c b/main.c index e8915f7..b248631 100644 --- a/main.c +++ b/main.c @@ -389,14 +389,14 @@ static bool preconsider_ok(int nwords, bool doprint) { bool had_max = 0; for (i=0, totalfrags=0; i= maxhamweight); - totalfrags += frags; PRINTF("%"PRADJ" ", adjmatrix[i]); double maxminsize = (double)m / frags; if (maxminsize <= best) { PRINTF(" too fine"); goto out; } + had_max += (frags >= maxhamweight); + totalfrags += frags; } if (!had_max) { /* Skip this candidate as its max hamming weight is lower than