X-Git-Url: https://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2Fdata%2FSourceInfo.java;h=b9609f1ac76cf7a557466b8b836df2f17afb24a9;hp=e78d5754cbb40a14594f25c73f87edb2b4ac9fd0;hb=a6197ddcaac11c0b943183da7d46169742d024af;hpb=88f2c3647ed9e055090484f01a959d4581f85e7d diff --git a/tim/prune/data/SourceInfo.java b/tim/prune/data/SourceInfo.java index e78d575..b9609f1 100644 --- a/tim/prune/data/SourceInfo.java +++ b/tim/prune/data/SourceInfo.java @@ -122,8 +122,12 @@ public class SourceInfo public int getIndex(DataPoint inPoint) { int idx = -1; - for (int i=0; i<_points.length && (idx < 0); i++) { - if (_points[i] == inPoint) {idx = i;} + for (int i=0; i<_points.length; i++) + { + if (_points[i] == inPoint) { + idx = i; + break; + } } if (idx == -1) {return idx;} // point not found if (_pointIndices == null) {return idx;} // All points loaded