git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'patch/JAL-3840_2_11_1_4' into releases/Release_2_11_1_Branch
[jalview.git]
/
src
/
jalview
/
datamodel
/
ResidueCount.java
diff --git
a/src/jalview/datamodel/ResidueCount.java
b/src/jalview/datamodel/ResidueCount.java
index
74eb887
..
efab97c
100644
(file)
--- a/
src/jalview/datamodel/ResidueCount.java
+++ b/
src/jalview/datamodel/ResidueCount.java
@@
-70,7
+70,7
@@
public class ResidueCount
*/
private static final String AAS = "ACDEFGHIKLMNPQRSTUVWXY";
*/
private static final String AAS = "ACDEFGHIKLMNPQRSTUVWXY";
- private static final int GAP_COUNT = 0;
+ static final int GAP_COUNT = 0;
/*
* fast lookup tables holding the index into our count
/*
* fast lookup tables holding the index into our count
@@
-212,7
+212,12
@@
public class ResidueCount
counts[offset] = (short) ++newValue;
}
}
counts[offset] = (short) ++newValue;
}
}
- maxCount = Math.max(maxCount, newValue);
+
+ if (offset!=GAP_COUNT)
+ {
+ // update modal residue count
+ maxCount = Math.max(maxCount, newValue);
+ }
return newValue;
}
return newValue;
}
@@
-301,15
+306,7
@@
public class ResidueCount
*/
public int addGap()
{
*/
public int addGap()
{
- int newValue;
- if (useIntCounts)
- {
- newValue = ++intCounts[GAP_COUNT];
- }
- else
- {
- newValue = ++counts[GAP_COUNT];
- }
+ int newValue = increment(GAP_COUNT);
return newValue;
}
return newValue;
}