Tweaked code to reuse constants.

pull/134/head
Project Nayuki 7 years ago
parent 71cc6576f6
commit 797d5bc3d0

@ -23,6 +23,8 @@
package io.nayuki.fastqrcodegen; package io.nayuki.fastqrcodegen;
import static io.nayuki.fastqrcodegen.QrCode.MAX_VERSION;
import static io.nayuki.fastqrcodegen.QrCode.MIN_VERSION;
import java.lang.ref.SoftReference; import java.lang.ref.SoftReference;
@ -72,9 +74,6 @@ final class QrTemplate {
} }
private static final int MIN_VERSION = 1;
private static final int MAX_VERSION = 40;
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
private static final SoftReference<QrTemplate>[] cache = new SoftReference[MAX_VERSION + 1]; private static final SoftReference<QrTemplate>[] cache = new SoftReference[MAX_VERSION + 1];

Loading…
Cancel
Save