From: gmungoc Date: Tue, 25 Oct 2016 09:01:11 +0000 (+0100) Subject: JAL-98 small efficiency fix + commenting X-Git-Tag: Release_2_10_1^2~22^2~3^2~8 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=5152cc0243b3ee298970fb473a8ea65d60897c01;p=jalview.git JAL-98 small efficiency fix + commenting --- diff --git a/src/jalview/analysis/ResidueCount.java b/src/jalview/analysis/ResidueCount.java index cd35206..256dbc2 100644 --- a/src/jalview/analysis/ResidueCount.java +++ b/src/jalview/analysis/ResidueCount.java @@ -494,6 +494,11 @@ public class ResidueCount } } } + + /* + * include 'other' characters recorded (even if count is zero + * though that would be a strange use case) + */ if (otherData != null) { size += otherData.size(); @@ -510,8 +515,9 @@ public class ResidueCount */ public SymbolCounts getSymbolCounts() { - char[] symbols = new char[size()]; - int[] values = new int[size()]; + int size = size(); + char[] symbols = new char[size]; + int[] values = new int[size]; int j = 0; if (useIntCounts)