Updated up to 8 comments in all language versions, but somewhat differently in each language.

This commit is contained in:
Project Nayuki
2018-08-28 21:08:00 +00:00
parent b9f69cf7bd
commit 3ead3dbb84
11 changed files with 71 additions and 75 deletions
+2 -2
View File
@@ -360,8 +360,8 @@ void QrCode::drawCodewords(const vector<uint8_t> &data) {
modules.at(y).at(x) = getBit(data.at(i >> 3), 7 - static_cast<int>(i & 7));
i++;
}
// If there are any remainder bits (0 to 7), they are already
// set to 0/false/white when the grid of modules was initialized
// If this QR Code has any remainder bits (0 to 7), they were assigned as
// 0/false/white by the constructor and are left unchanged by this method
}
}
}
+3 -4
View File
@@ -77,7 +77,7 @@ class QrCode final {
/*
* Returns a QR Code symbol representing the given data segments with the given encoding parameters.
* Returns a QR Code symbol representing the given segments with the given encoding parameters.
* The smallest possible QR Code version within the given range is automatically chosen for the output.
* This function allows the user to create a custom sequence of segments that switches
* between modes (such as alphanumeric and binary) to encode text more efficiently.
@@ -154,9 +154,8 @@ class QrCode final {
/*
* Based on the given number of border modules to add as padding, this returns a
* string whose contents represents an SVG XML file that depicts this QR Code symbol.
* Note that Unix newlines (\n) are always used, regardless of the platform.
* Returns a string of SVG XML code representing an image of this QR Code symbol with the given
* number of border modules. Note that Unix newlines (\n) are always used, regardless of the platform.
*/
public: std::string toSvgString(int border) const;
+5 -4
View File
@@ -31,9 +31,8 @@
namespace qrcodegen {
/*
* Represents a character string to be encoded in a QR Code symbol. Each segment has
* a mode, and a sequence of characters that is already encoded as a sequence of bits.
* Instances of this class are immutable.
* Represents a segment of character data, binary data, or control data
* to be put into a QR Code symbol. Instances of this class are immutable.
* This segment class imposes no length restrictions, but QR Codes have restrictions.
* Even in the most favorable conditions, a QR Code can only hold 7089 characters of data.
* Any segment longer than this is meaningless for the purpose of generating QR Codes.
@@ -58,8 +57,10 @@ class QrSegment final {
/*-- Fields --*/
// The mode indicator bits, which is a uint4 value (range 0 to 15).
private: int modeBits;
// Three values for different version ranges.
private: int numBitsCharCount[3];
@@ -150,7 +151,7 @@ class QrSegment final {
/*---- Constructors ----*/
/*
* Creates a new QR Code data segment with the given parameters and data.
* Creates a new QR Code segment with the given parameters and data.
*/
public: QrSegment(Mode md, int numCh, const std::vector<bool> &dt);