Changed C++ QrCode class to eliminate const from fields, updated related code.

This commit is contained in:
Project Nayuki
2017-09-06 04:03:52 +00:00
parent 70a181753a
commit a138e6fbc3
4 changed files with 33 additions and 9 deletions
+3 -3
View File
@@ -85,9 +85,9 @@ int main() {
const QrCode qr = QrCode::encodeSegments(segs,
*ECC_LEVELS[errCorLvl], minVersion, maxVersion, mask, boostEcl == 1);
// Print grid of modules
std::cout << qr.version << std::endl;
for (int y = 0; y < qr.size; y++) {
for (int x = 0; x < qr.size; x++)
std::cout << qr.getVersion() << std::endl;
for (int y = 0; y < qr.getSize(); y++) {
for (int x = 0; x < qr.getSize(); x++)
std::cout << (qr.getModule(x, y) ? 1 : 0) << std::endl;
}