From 797d5bc3d0511e296d1f3c7f0078120bc6410601 Mon Sep 17 00:00:00 2001 From: Project Nayuki Date: Wed, 29 Nov 2017 20:37:17 +0000 Subject: [PATCH] Tweaked code to reuse constants. --- src/io/nayuki/fastqrcodegen/QrTemplate.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/io/nayuki/fastqrcodegen/QrTemplate.java b/src/io/nayuki/fastqrcodegen/QrTemplate.java index e218ed0..b31da45 100644 --- a/src/io/nayuki/fastqrcodegen/QrTemplate.java +++ b/src/io/nayuki/fastqrcodegen/QrTemplate.java @@ -23,6 +23,8 @@ 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; @@ -72,9 +74,6 @@ final class QrTemplate { } - private static final int MIN_VERSION = 1; - private static final int MAX_VERSION = 40; - @SuppressWarnings("unchecked") private static final SoftReference[] cache = new SoftReference[MAX_VERSION + 1];