From ff9fbba9cfd5406aa23a02b9c68c9db61b5474ec Mon Sep 17 00:00:00 2001 From: Project Nayuki Date: Tue, 14 Jun 2016 17:10:55 +0000 Subject: [PATCH] Renamed loop variable from j to i in ReedSolomonGenerator.getRemainder() in most language versions. --- java/io/nayuki/qrcodegen/QrCode.java | 4 ++-- javascript/qrcodegen.js | 4 ++-- python/qrcodegen.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/java/io/nayuki/qrcodegen/QrCode.java b/java/io/nayuki/qrcodegen/QrCode.java index bf9c760..669c09e 100644 --- a/java/io/nayuki/qrcodegen/QrCode.java +++ b/java/io/nayuki/qrcodegen/QrCode.java @@ -841,8 +841,8 @@ public final class QrCode { int factor = (b ^ result[0]) & 0xFF; System.arraycopy(result, 1, result, 0, result.length - 1); result[result.length - 1] = 0; - for (int j = 0; j < result.length; j++) - result[j] ^= multiply(coefficients[j] & 0xFF, factor); + for (int i = 0; i < result.length; i++) + result[i] ^= multiply(coefficients[i] & 0xFF, factor); } return result; } diff --git a/javascript/qrcodegen.js b/javascript/qrcodegen.js index a6fc652..e1dda5c 100644 --- a/javascript/qrcodegen.js +++ b/javascript/qrcodegen.js @@ -950,8 +950,8 @@ var qrcodegen = new function() { var factor = b ^ result[0]; result.shift(); result.push(0); - for (var j = 0; j < result.length; j++) - result[j] ^= ReedSolomonGenerator.multiply(coefficients[j], factor); + for (var i = 0; i < result.length; i++) + result[i] ^= ReedSolomonGenerator.multiply(coefficients[i], factor); }); return result; }; diff --git a/python/qrcodegen.py b/python/qrcodegen.py index 5cb51ac..7113cf6 100644 --- a/python/qrcodegen.py +++ b/python/qrcodegen.py @@ -795,8 +795,8 @@ class _ReedSolomonGenerator(object): factor = (b ^ result[0]) del result[0] result.append(0) - for j in range(len(result)): - result[j] ^= _ReedSolomonGenerator.multiply(self.coefficients[j], factor) + for i in range(len(result)): + result[i] ^= _ReedSolomonGenerator.multiply(self.coefficients[i], factor) return result