Return value isn't used.

numIndexesMinus1 should not be negative so we want the max(numIndexesMinus1, 0) but for that we need to use the return value from BigInteger.max().
This commit is contained in:
Thomas Leplus 2021-09-16 23:10:24 -07:00 committed by Ryan Kurtz
parent a694fd1b52
commit 0c529f055e

View file

@ -437,7 +437,7 @@ abstract class MarkerSetImpl implements MarkerSet {
BigInteger bigEndy = BigInteger.valueOf(y + MARKER_HEIGHT);
BigInteger numIndexes = map.getIndexCount();
BigInteger numIndexesMinus1 = numIndexes.subtract(BigInteger.ONE);
numIndexesMinus1.max(BigInteger.ZERO);
numIndexesMinus1 = numIndexesMinus1.max(BigInteger.ZERO);
BigInteger start = getIndex(bigStarty, bigHeight, numIndexes, numIndexesMinus1);
BigInteger end = getIndex(bigEndy, bigHeight, numIndexes, numIndexesMinus1);