Split long lines in 2 comments in {Java, JavaScript, Python, C++} language versions, without changing wording.

pull/16/head
Project Nayuki 7 years ago
parent d8b66fcbf1
commit 2fd05cc7ef

@ -280,8 +280,9 @@ class QrCode final {
/*-- Method --*/ /*-- Method --*/
/* /*
* Computes and returns the Reed-Solomon error correction codewords for the given sequence of data codewords. * Computes and returns the Reed-Solomon error correction codewords for the given
* The returned object is always a new byte array. This method does not alter this object's state (because it is immutable). * 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<std::uint8_t> getRemainder(const std::vector<std::uint8_t> &data) const; public: std::vector<std::uint8_t> getRemainder(const std::vector<std::uint8_t> &data) const;

@ -95,8 +95,9 @@ class QrSegment final {
/* /*
* Returns a segment representing the given text string encoded in alphanumeric mode. The characters allowed are: * Returns a segment representing the given text string encoded in alphanumeric mode.
* 0 to 9, A to Z (uppercase only), space, dollar, percent, asterisk, plus, hyphen, period, slash, colon. * 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); public: static QrSegment makeAlphanumeric(const char *text);

@ -820,8 +820,9 @@ public final class QrCode {
/*-- Method --*/ /*-- Method --*/
/** /**
* Computes and returns the Reed-Solomon error correction codewords for the specified sequence of data codewords. * Computes and returns the Reed-Solomon error correction codewords for the specified
* The returned object is always a new byte array. This method does not alter this object's state (because it is immutable). * 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 * @param data the sequence of data codewords
* @return the Reed-Solomon error correction codewords * @return the Reed-Solomon error correction codewords
* @throws NullPointerException if the data is {@code null} * @throws NullPointerException if the data is {@code null}

@ -81,8 +81,9 @@ public final class QrSegment {
/** /**
* Returns a segment representing the specified text string encoded in alphanumeric mode. The characters allowed are: * Returns a segment representing the specified text string encoded in alphanumeric mode.
* 0 to 9, A to Z (uppercase only), space, dollar, percent, asterisk, plus, hyphen, period, slash, colon. * 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 * @param text a string of text, with only certain characters allowed
* @return a segment containing the data * @return a segment containing the data
* @throws NullPointerException if the string is {@code null} * @throws NullPointerException if the string is {@code null}

@ -784,8 +784,9 @@ var qrcodegen = new function() {
/* /*
* Returns a segment representing the given text string encoded in alphanumeric mode. The characters allowed are: * Returns a segment representing the given text string encoded in alphanumeric mode.
* 0 to 9, A to Z (uppercase only), space, dollar, percent, asterisk, plus, hyphen, period, slash, colon. * 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) { this.QrSegment.makeAlphanumeric = function(text) {
if (!this.ALPHANUMERIC_REGEX.test(text)) if (!this.ALPHANUMERIC_REGEX.test(text))
@ -953,8 +954,9 @@ var qrcodegen = new function() {
root = ReedSolomonGenerator.multiply(root, 0x02); root = ReedSolomonGenerator.multiply(root, 0x02);
} }
// Computes and returns the Reed-Solomon error correction codewords for the given sequence of data codewords. // Computes and returns the Reed-Solomon error correction codewords for the given
// The returned object is always a new byte array. This method does not alter this object's state (because it is immutable). // 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) { this.getRemainder = function(data) {
// Compute the remainder by performing polynomial division // Compute the remainder by performing polynomial division
var result = coefficients.map(function() { return 0; }); var result = coefficients.map(function() { return 0; });

@ -640,8 +640,9 @@ class QrSegment(object):
@staticmethod @staticmethod
def make_alphanumeric(text): def make_alphanumeric(text):
"""Returns a segment representing the given text string encoded in alphanumeric mode. The characters allowed are: """Returns a segment representing the given text string encoded in alphanumeric mode.
0 to 9, A to Z (uppercase only), space, dollar, percent, asterisk, plus, hyphen, period, slash, colon.""" 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: if QrSegment.ALPHANUMERIC_REGEX.match(text) is None:
raise ValueError("String contains unencodable characters in alphanumeric mode") raise ValueError("String contains unencodable characters in alphanumeric mode")
bb = _BitBuffer() bb = _BitBuffer()
@ -801,8 +802,9 @@ class _ReedSolomonGenerator(object):
def get_remainder(self, data): def get_remainder(self, data):
"""Computes and returns the Reed-Solomon error correction codewords for the given sequence of data codewords. """Computes and returns the Reed-Solomon error correction codewords for the given
The returned object is always a new byte list. This method does not alter this object's state (because it is immutable).""" 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 # Compute the remainder by performing polynomial division
result = [0] * len(self.coefficients) result = [0] * len(self.coefficients)
for b in data: for b in data:

Loading…
Cancel
Save