Refactored control flow to reduce nesting.
This commit is contained in:
parent
78e234fb0d
commit
cf0dbd4d0f
|
@ -182,7 +182,8 @@ public final class QrSegmentAdvanced {
|
|||
QrSegment.Mode curMode = charModes[0];
|
||||
int start = 0;
|
||||
for (int i = 1; ; i++) {
|
||||
if (i >= data.length || charModes[i] != curMode) {
|
||||
if (i < data.length && charModes[i] == curMode)
|
||||
continue;
|
||||
if (curMode == BYTE)
|
||||
result.add(QrSegment.makeBytes(Arrays.copyOfRange(data, start, i)));
|
||||
else {
|
||||
|
@ -200,7 +201,6 @@ public final class QrSegmentAdvanced {
|
|||
start = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static boolean isAlphanumeric(char c) {
|
||||
|
|
Loading…
Reference in New Issue