From 2fd05cc7ef08e2221dee4e5142c7ac6841fcde50 Mon Sep 17 00:00:00 2001 From: Project Nayuki Date: Thu, 31 Aug 2017 20:13:05 +0000 Subject: [PATCH] Split long lines in 2 comments in {Java, JavaScript, Python, C++} language versions, without changing wording. --- cpp/QrCode.hpp | 5 +++-- cpp/QrSegment.hpp | 5 +++-- java/io/nayuki/qrcodegen/QrCode.java | 5 +++-- java/io/nayuki/qrcodegen/QrSegment.java | 5 +++-- javascript/qrcodegen.js | 10 ++++++---- python/qrcodegen.py | 10 ++++++---- 6 files changed, 24 insertions(+), 16 deletions(-) diff --git a/cpp/QrCode.hpp b/cpp/QrCode.hpp index 7be64d0..87baebc 100644 --- a/cpp/QrCode.hpp +++ b/cpp/QrCode.hpp @@ -280,8 +280,9 @@ class QrCode final { /*-- Method --*/ /* - * Computes and returns the Reed-Solomon error correction codewords for the given sequence of data codewords. - * The returned object is always a new byte array. This method does not alter this object's state (because it is immutable). + * Computes and returns the Reed-Solomon error correction codewords for the given + * sequence of data codewords. The returned object is always a new byte array. + * This method does not alter this object's state (because it is immutable). */ public: std::vector getRemainder(const std::vector &data) const; diff --git a/cpp/QrSegment.hpp b/cpp/QrSegment.hpp index 2c5a908..acb0109 100644 --- a/cpp/QrSegment.hpp +++ b/cpp/QrSegment.hpp @@ -95,8 +95,9 @@ class QrSegment final { /* - * Returns a segment representing the given text string encoded in alphanumeric mode. The characters allowed are: - * 0 to 9, A to Z (uppercase only), space, dollar, percent, asterisk, plus, hyphen, period, slash, colon. + * Returns a segment representing the given text string encoded in alphanumeric mode. + * The characters allowed are: 0 to 9, A to Z (uppercase only), space, + * dollar, percent, asterisk, plus, hyphen, period, slash, colon. */ public: static QrSegment makeAlphanumeric(const char *text); diff --git a/java/io/nayuki/qrcodegen/QrCode.java b/java/io/nayuki/qrcodegen/QrCode.java index e0341b8..b207e2a 100644 --- a/java/io/nayuki/qrcodegen/QrCode.java +++ b/java/io/nayuki/qrcodegen/QrCode.java @@ -820,8 +820,9 @@ public final class QrCode { /*-- Method --*/ /** - * Computes and returns the Reed-Solomon error correction codewords for the specified sequence of data codewords. - * The returned object is always a new byte array. This method does not alter this object's state (because it is immutable). + * Computes and returns the Reed-Solomon error correction codewords for the specified + * sequence of data codewords. The returned object is always a new byte array. + * This method does not alter this object's state (because it is immutable). * @param data the sequence of data codewords * @return the Reed-Solomon error correction codewords * @throws NullPointerException if the data is {@code null} diff --git a/java/io/nayuki/qrcodegen/QrSegment.java b/java/io/nayuki/qrcodegen/QrSegment.java index 708be71..0429947 100644 --- a/java/io/nayuki/qrcodegen/QrSegment.java +++ b/java/io/nayuki/qrcodegen/QrSegment.java @@ -81,8 +81,9 @@ public final class QrSegment { /** - * Returns a segment representing the specified text string encoded in alphanumeric mode. The characters allowed are: - * 0 to 9, A to Z (uppercase only), space, dollar, percent, asterisk, plus, hyphen, period, slash, colon. + * Returns a segment representing the specified text string encoded in alphanumeric mode. + * The characters allowed are: 0 to 9, A to Z (uppercase only), space, + * dollar, percent, asterisk, plus, hyphen, period, slash, colon. * @param text a string of text, with only certain characters allowed * @return a segment containing the data * @throws NullPointerException if the string is {@code null} diff --git a/javascript/qrcodegen.js b/javascript/qrcodegen.js index 3225d06..fe384f2 100644 --- a/javascript/qrcodegen.js +++ b/javascript/qrcodegen.js @@ -784,8 +784,9 @@ var qrcodegen = new function() { /* - * Returns a segment representing the given text string encoded in alphanumeric mode. The characters allowed are: - * 0 to 9, A to Z (uppercase only), space, dollar, percent, asterisk, plus, hyphen, period, slash, colon. + * Returns a segment representing the given text string encoded in alphanumeric mode. + * The characters allowed are: 0 to 9, A to Z (uppercase only), space, + * dollar, percent, asterisk, plus, hyphen, period, slash, colon. */ this.QrSegment.makeAlphanumeric = function(text) { if (!this.ALPHANUMERIC_REGEX.test(text)) @@ -953,8 +954,9 @@ var qrcodegen = new function() { root = ReedSolomonGenerator.multiply(root, 0x02); } - // Computes and returns the Reed-Solomon error correction codewords for the given sequence of data codewords. - // The returned object is always a new byte array. This method does not alter this object's state (because it is immutable). + // Computes and returns the Reed-Solomon error correction codewords for the given + // sequence of data codewords. The returned object is always a new byte array. + // This method does not alter this object's state (because it is immutable). this.getRemainder = function(data) { // Compute the remainder by performing polynomial division var result = coefficients.map(function() { return 0; }); diff --git a/python/qrcodegen.py b/python/qrcodegen.py index 299a751..4f2808b 100644 --- a/python/qrcodegen.py +++ b/python/qrcodegen.py @@ -640,8 +640,9 @@ class QrSegment(object): @staticmethod def make_alphanumeric(text): - """Returns a segment representing the given text string encoded in alphanumeric mode. The characters allowed are: - 0 to 9, A to Z (uppercase only), space, dollar, percent, asterisk, plus, hyphen, period, slash, colon.""" + """Returns a segment representing the given text string encoded in alphanumeric mode. + The characters allowed are: 0 to 9, A to Z (uppercase only), space, + dollar, percent, asterisk, plus, hyphen, period, slash, colon.""" if QrSegment.ALPHANUMERIC_REGEX.match(text) is None: raise ValueError("String contains unencodable characters in alphanumeric mode") bb = _BitBuffer() @@ -801,8 +802,9 @@ class _ReedSolomonGenerator(object): def get_remainder(self, data): - """Computes and returns the Reed-Solomon error correction codewords for the given sequence of data codewords. - The returned object is always a new byte list. This method does not alter this object's state (because it is immutable).""" + """Computes and returns the Reed-Solomon error correction codewords for the given + sequence of data codewords. The returned object is always a new byte list. + This method does not alter this object's state (because it is immutable).""" # Compute the remainder by performing polynomial division result = [0] * len(self.coefficients) for b in data: