Tweaked comment and blank line in QrCode constructor in some languages.
This commit is contained in:
parent
0a0ac19f9b
commit
f63f7f79a6
|
@ -95,7 +95,7 @@ var qrcodegen = new function() {
|
|||
var allCodewords = addEccAndInterleave(dataCodewords);
|
||||
drawCodewords(allCodewords);
|
||||
|
||||
// Handle masking
|
||||
// Do masking
|
||||
if (mask == -1) { // Automatically choose best mask
|
||||
var minPenalty = Infinity;
|
||||
for (var i = 0; i < 8; i++) {
|
||||
|
@ -113,6 +113,7 @@ var qrcodegen = new function() {
|
|||
throw "Assertion error";
|
||||
drawFormatBits(mask); // Overwrite old format bits
|
||||
applyMask(mask); // Apply the final choice of mask
|
||||
|
||||
isFunction = null;
|
||||
|
||||
|
||||
|
|
|
@ -176,7 +176,7 @@ class QrCode(object):
|
|||
allcodewords = self._add_ecc_and_interleave(datacodewords)
|
||||
self._draw_codewords(allcodewords)
|
||||
|
||||
# Handle masking
|
||||
# Do masking
|
||||
if mask == -1: # Automatically choose best mask
|
||||
minpenalty = 1 << 32
|
||||
for i in range(8):
|
||||
|
@ -191,6 +191,7 @@ class QrCode(object):
|
|||
self._draw_format_bits(mask) # Overwrite old format bits
|
||||
self._apply_mask(mask) # Apply the final choice of mask
|
||||
self._mask = mask
|
||||
|
||||
del self._isfunction
|
||||
|
||||
|
||||
|
|
|
@ -181,7 +181,7 @@ namespace qrcodegen {
|
|||
let allCodewords: Array<byte> = this.addEccAndInterleave(dataCodewords);
|
||||
this.drawCodewords(allCodewords);
|
||||
|
||||
// Handle masking
|
||||
// Do masking
|
||||
if (mask == -1) { // Automatically choose best mask
|
||||
let minPenalty: int = 1000000000;
|
||||
for (let i = 0; i < 8; i++) {
|
||||
|
@ -200,6 +200,7 @@ namespace qrcodegen {
|
|||
this.mask = mask;
|
||||
this.drawFormatBits(mask); // Overwrite old format bits
|
||||
this.applyMask(mask); // Apply the final choice of mask
|
||||
|
||||
this.isFunction = [];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue