From 1b2a5541212ea25eb03014e95ea4326189e7a3fe Mon Sep 17 00:00:00 2001 From: Nayuki Minase Date: Sat, 16 Apr 2016 01:17:15 +0000 Subject: [PATCH] Tweaked minor comment and whitespace consistency in Python and C++ code. --- cpp/BitBuffer.hpp | 2 +- cpp/QrCode.cpp | 1 - python/qrcodegen-demo.py | 2 +- python/qrcodegen.py | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cpp/BitBuffer.hpp b/cpp/BitBuffer.hpp index 47daebb..89f032e 100644 --- a/cpp/BitBuffer.hpp +++ b/cpp/BitBuffer.hpp @@ -31,7 +31,7 @@ namespace qrcodegen { -/** +/* * An appendable sequence of bits. Bits are packed in big endian within a byte. */ class BitBuffer final { diff --git a/cpp/QrCode.cpp b/cpp/QrCode.cpp index 96ab0a4..c0de087 100644 --- a/cpp/QrCode.cpp +++ b/cpp/QrCode.cpp @@ -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; diff --git a/python/qrcodegen-demo.py b/python/qrcodegen-demo.py index 7978c94..81be66d 100644 --- a/python/qrcodegen-demo.py +++ b/python/qrcodegen-demo.py @@ -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): diff --git a/python/qrcodegen.py b/python/qrcodegen.py index eeda106..8de6d8e 100644 --- a/python/qrcodegen.py +++ b/python/qrcodegen.py @@ -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."""