Changed QrCode.getModule() in {Java, JavaScript, Python, C++} language versions to return Boolean instead of 0/1 - to match {C, Rust} language versions - and updated comments and usages.

This commit is contained in:
Project Nayuki
2017-08-31 20:39:29 +00:00
parent 6f9116dfcb
commit 9c1a25aba4
11 changed files with 32 additions and 41 deletions
+1 -1
View File
@@ -168,7 +168,7 @@ static void printQr(const QrCode &qr) {
int border = 4;
for (int y = -border; y < qr.size + border; y++) {
for (int x = -border; x < qr.size + border; x++) {
std::cout << (qr.getModule(x, y) == 1 ? "##" : " ");
std::cout << (qr.getModule(x, y) ? "##" : " ");
}
std::cout << std::endl;
}