Tweaked minor comment and whitespace consistency in Python and C++ code.

pull/4/head
Nayuki Minase 9 years ago
parent 3fda371340
commit 1b2a554121

@ -31,7 +31,7 @@
namespace qrcodegen {
/**
/*
* An appendable sequence of bits. Bits are packed in big endian within a byte.
*/
class BitBuffer final {

@ -545,7 +545,6 @@ int qrcodegen::QrCode::getNumDataCodewords(int ver, const Ecc &ecl) {
/*---- Tables of constants ----*/
// For use in getPenaltyScore(), when evaluating which mask is best.
const int qrcodegen::QrCode::PENALTY_N1 = 3;
const int qrcodegen::QrCode::PENALTY_N2 = 3;
const int qrcodegen::QrCode::PENALTY_N3 = 40;

@ -110,7 +110,7 @@ def do_segment_demo():
# ---- Utilities ----
def print_qr(qrcode):
def print_qr(qrcode):
"""Prints the given QrCode object to the console."""
border = 4
for y in range(-border, qrcode.get_size() + border):

@ -66,7 +66,7 @@ def encode_text(text, ecl):
code points (not UTF-16 code units). The smallest possible QR Code version is automatically chosen for the output."""
seg = encode_text_to_segment(text)
return encode_segments([seg], ecl)
def encode_text_to_segment(text):
"""Returns a QR segment representing the given Unicode text string."""

Loading…
Cancel
Save