From 2ffc439340b40e1909e7260fa821aff308d84606 Mon Sep 17 00:00:00 2001 From: Project Nayuki Date: Thu, 20 Apr 2017 06:39:59 +0000 Subject: [PATCH] Updated comments in drawFunctionPatterns() of all other language versions to synchronize with C code. --- cpp/QrCode.cpp | 4 ++-- java/io/nayuki/qrcodegen/QrCode.java | 4 ++-- javascript/qrcodegen.js | 4 ++-- python/qrcodegen.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cpp/QrCode.cpp b/cpp/QrCode.cpp index bca9b3e..8b68b07 100644 --- a/cpp/QrCode.cpp +++ b/cpp/QrCode.cpp @@ -191,7 +191,7 @@ std::string qrcodegen::QrCode::toSvgString(int border) const { void qrcodegen::QrCode::drawFunctionPatterns() { - // Draw the horizontal and vertical timing patterns + // Draw horizontal and vertical timing patterns for (int i = 0; i < size; i++) { setFunctionModule(6, i, i % 2 == 0); setFunctionModule(i, 6, i % 2 == 0); @@ -202,7 +202,7 @@ void qrcodegen::QrCode::drawFunctionPatterns() { drawFinderPattern(size - 4, 3); drawFinderPattern(3, size - 4); - // Draw the numerous alignment patterns + // Draw numerous alignment patterns const std::vector alignPatPos(getAlignmentPatternPositions(version)); int numAlign = alignPatPos.size(); for (int i = 0; i < numAlign; i++) { diff --git a/java/io/nayuki/qrcodegen/QrCode.java b/java/io/nayuki/qrcodegen/QrCode.java index fafd225..5cdb34c 100644 --- a/java/io/nayuki/qrcodegen/QrCode.java +++ b/java/io/nayuki/qrcodegen/QrCode.java @@ -334,7 +334,7 @@ public final class QrCode { /*---- Private helper methods for constructor: Drawing function modules ----*/ private void drawFunctionPatterns() { - // Draw the horizontal and vertical timing patterns + // Draw horizontal and vertical timing patterns for (int i = 0; i < size; i++) { setFunctionModule(6, i, i % 2 == 0); setFunctionModule(i, 6, i % 2 == 0); @@ -345,7 +345,7 @@ public final class QrCode { drawFinderPattern(size - 4, 3); drawFinderPattern(3, size - 4); - // Draw the numerous alignment patterns + // Draw numerous alignment patterns int[] alignPatPos = getAlignmentPatternPositions(version); int numAlign = alignPatPos.length; for (int i = 0; i < numAlign; i++) { diff --git a/javascript/qrcodegen.js b/javascript/qrcodegen.js index 73c67b0..71a885e 100644 --- a/javascript/qrcodegen.js +++ b/javascript/qrcodegen.js @@ -234,7 +234,7 @@ var qrcodegen = new function() { /*---- Private helper methods for constructor: Drawing function modules ----*/ function drawFunctionPatterns() { - // Draw the horizontal and vertical timing patterns + // Draw horizontal and vertical timing patterns for (var i = 0; i < size; i++) { setFunctionModule(6, i, i % 2 == 0); setFunctionModule(i, 6, i % 2 == 0); @@ -245,7 +245,7 @@ var qrcodegen = new function() { drawFinderPattern(size - 4, 3); drawFinderPattern(3, size - 4); - // Draw the numerous alignment patterns + // Draw numerous alignment patterns var alignPatPos = QrCode.getAlignmentPatternPositions(version); var numAlign = alignPatPos.length; for (var i = 0; i < numAlign; i++) { diff --git a/python/qrcodegen.py b/python/qrcodegen.py index be72451..b8365d8 100644 --- a/python/qrcodegen.py +++ b/python/qrcodegen.py @@ -253,7 +253,7 @@ class QrCode(object): # ---- Private helper methods for constructor: Drawing function modules ---- def _draw_function_patterns(self): - # Draw the horizontal and vertical timing patterns + # Draw horizontal and vertical timing patterns for i in range(self._size): self._set_function_module(6, i, i % 2 == 0) self._set_function_module(i, 6, i % 2 == 0) @@ -263,7 +263,7 @@ class QrCode(object): self._draw_finder_pattern(self._size - 4, 3) self._draw_finder_pattern(3, self._size - 4) - # Draw the numerous alignment patterns + # Draw numerous alignment patterns alignpatpos = QrCode._get_alignment_pattern_positions(self._version) numalign = len(alignpatpos) skips = ((0, 0), (0, numalign - 1), (numalign - 1, 0)) # Skip the three finder corners