From df55fd6504a367f0648e573424b3d844e838ed86 Mon Sep 17 00:00:00 2001 From: Project Nayuki Date: Mon, 5 Nov 2018 05:18:03 +0000 Subject: [PATCH] Rearranged variables, updated comment. --- src/io/nayuki/fastqrcodegen/QrCode.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/io/nayuki/fastqrcodegen/QrCode.java b/src/io/nayuki/fastqrcodegen/QrCode.java index 2fd362d..7825632 100644 --- a/src/io/nayuki/fastqrcodegen/QrCode.java +++ b/src/io/nayuki/fastqrcodegen/QrCode.java @@ -485,11 +485,11 @@ public final class QrCode { // Iterate over adjacent pairs of rows for (int index = 0, downIndex = size, end = size * size; index < end; ) { - int curRow = 0; - int nextRow = 0; Arrays.fill(runHistory, 0); int color = 0; int runX = 0; + int curRow = 0; + int nextRow = 0; for (int x = 0; x < size; x++, index++, downIndex++) { int c = getBit(modules[index >>> 5], index); if (c == color) { @@ -589,7 +589,7 @@ public final class QrCode { } - // Returns 0 or 1 based on the i'th bit of x. + // Returns 0 or 1 based on the (i mod 32)'th bit of x. static int getBit(int x, int i) { return (x >>> i) & 1; }