From d8f7080f6bd2953aa6a3ac14605464e48c233aa2 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Fri, 14 Oct 2022 16:35:34 +0100 Subject: [PATCH] JAL-4079 avoid calling Alignment.getWidth() for each pass of a loop --- src/jalview/structures/models/AAStructureBindingModel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jalview/structures/models/AAStructureBindingModel.java b/src/jalview/structures/models/AAStructureBindingModel.java index 906cb59..6ce896c 100644 --- a/src/jalview/structures/models/AAStructureBindingModel.java +++ b/src/jalview/structures/models/AAStructureBindingModel.java @@ -700,7 +700,7 @@ public abstract class AAStructureBindingModel { refStructure = pdbfnum; } - for (int r = 0; r < alignment.getWidth(); r++) + for (int r = 0, wid = alignment.getWidth(); r < wid; r++) { if (!matched.get(r)) { -- 1.7.10.2