mirror of
https://gitee.com/openharmony/third_party_qrcodegen
synced 2024-11-23 07:10:22 +00:00
Added a comment in Java QrSegmentAdvanced.makeSegmentsOptimally() functions to be consistent with QrCode.encodeSegments().
This commit is contained in:
parent
daa3114dcf
commit
9e81969139
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user