From 9e81969139268938134aa68dc984c5fb666f5741 Mon Sep 17 00:00:00 2001 From: Project Nayuki Date: Fri, 7 Jan 2022 06:04:32 +0000 Subject: [PATCH] Added a comment in Java QrSegmentAdvanced.makeSegmentsOptimally() functions to be consistent with QrCode.encodeSegments(). --- java-fast/io/nayuki/fastqrcodegen/QrSegmentAdvanced.java | 2 +- java/src/main/java/io/nayuki/qrcodegen/QrSegmentAdvanced.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java-fast/io/nayuki/fastqrcodegen/QrSegmentAdvanced.java b/java-fast/io/nayuki/fastqrcodegen/QrSegmentAdvanced.java index 3cd5ae5..3bc2da1 100644 --- a/java-fast/io/nayuki/fastqrcodegen/QrSegmentAdvanced.java +++ b/java-fast/io/nayuki/fastqrcodegen/QrSegmentAdvanced.java @@ -76,7 +76,7 @@ public final class QrSegmentAdvanced { assert segs != null; // Check if the segments fit - int dataCapacityBits = QrCode.getNumDataCodewords(version, ecl) * 8; + int dataCapacityBits = QrCode.getNumDataCodewords(version, ecl) * 8; // Number of data bits available int dataUsedBits = QrSegment.getTotalBits(segs, version); if (dataUsedBits != -1 && dataUsedBits <= dataCapacityBits) return segs; // This version number is found to be suitable diff --git a/java/src/main/java/io/nayuki/qrcodegen/QrSegmentAdvanced.java b/java/src/main/java/io/nayuki/qrcodegen/QrSegmentAdvanced.java index d018a65..f054f16 100644 --- a/java/src/main/java/io/nayuki/qrcodegen/QrSegmentAdvanced.java +++ b/java/src/main/java/io/nayuki/qrcodegen/QrSegmentAdvanced.java @@ -76,7 +76,7 @@ public final class QrSegmentAdvanced { assert segs != null; // Check if the segments fit - int dataCapacityBits = QrCode.getNumDataCodewords(version, ecl) * 8; + int dataCapacityBits = QrCode.getNumDataCodewords(version, ecl) * 8; // Number of data bits available int dataUsedBits = QrSegment.getTotalBits(segs, version); if (dataUsedBits != -1 && dataUsedBits <= dataCapacityBits) return segs; // This version number is found to be suitable