From 1e263f063aeb478185020687227ea688be7d0847 Mon Sep 17 00:00:00 2001 From: kiramt Date: Wed, 4 Oct 2017 08:57:16 +0100 Subject: [PATCH] JAL-2674 tidy --- src/jalview/datamodel/HiddenColumns.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/jalview/datamodel/HiddenColumns.java b/src/jalview/datamodel/HiddenColumns.java index 839cee2..a6b4f82 100644 --- a/src/jalview/datamodel/HiddenColumns.java +++ b/src/jalview/datamodel/HiddenColumns.java @@ -701,21 +701,19 @@ public class HiddenColumns try { LOCK.readLock().lock(); - int fpos = seq.getStart(); - int lpos = seq.getEnd(); int start = 0; if (hiddenColumns == null || hiddenColumns.size() == 0) { - int ifpos = seq.findIndex(fpos) - 1; - int ilpos = seq.findIndex(lpos) - 1; + int ifpos = seq.findIndex(seq.getStart()) - 1; + int ilpos = seq.findIndex(seq.getEnd()) - 1; return new int[] { ifpos, ifpos, ilpos }; } // Simply walk along the sequence whilst watching for hidden column // boundaries Iterator regions = iterator(); - int spos = fpos; + int spos = seq.getStart(); int hideStart = seq.getLength(); int hideEnd = -1; int visPrev = 0; @@ -723,8 +721,7 @@ public class HiddenColumns int firstP = -1; int lastP = -1; boolean foundStart = false; - for (int p = 0, pLen = seq.getLength(); spos <= seq.getEnd() - && p < pLen; p++) + for (int p = 0; spos <= seq.getEnd() && p < seq.getLength(); p++) { if (!Comparison.isGap(seq.getCharAt(p))) { @@ -753,11 +750,9 @@ public class HiddenColumns { if (!foundStart) { - fpos = spos; start = p; foundStart = true; } - lpos = spos; } // look for next sequence position spos++; -- 1.7.10.2