diff --git a/cpp/QrCodeGeneratorDemo.cpp b/cpp/QrCodeGeneratorDemo.cpp index 168e273..1286433 100644 --- a/cpp/QrCodeGeneratorDemo.cpp +++ b/cpp/QrCodeGeneratorDemo.cpp @@ -187,7 +187,7 @@ static void doMaskDemo() { /*---- Utilities ----*/ -// Prints the given QR Code to the console. +// Prints the given QrCode object to the console. static void printQr(const QrCode &qr) { int border = 4; for (int y = -border; y < qr.getSize() + border; y++) { diff --git a/java/io/nayuki/qrcodegen/QrCodeGeneratorDemo.java b/java/io/nayuki/qrcodegen/QrCodeGeneratorDemo.java index 2b4baa4..3c50bda 100644 --- a/java/io/nayuki/qrcodegen/QrCodeGeneratorDemo.java +++ b/java/io/nayuki/qrcodegen/QrCodeGeneratorDemo.java @@ -62,7 +62,8 @@ public final class QrCodeGeneratorDemo { ImageIO.write(img, "png", imgFile); // Write image to file String svg = qr.toSvgString(4); // Convert to SVG XML code - Files.write(new File("hello-world-QR.svg").toPath(), + File svgFile = new File("hello-world-QR.svg"); // File path for output + Files.write(svgFile.toPath(), // Write image to file svg.getBytes(StandardCharsets.UTF_8)); }