]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - tim/prune/data/SourceInfo.java
Version 17, September 2014
[GpsPrune.git] / tim / prune / data / SourceInfo.java
index 341bf0299410a3f767adcf9fbe9f3064d9053aef..b9609f1ac76cf7a557466b8b836df2f17afb24a9 100644 (file)
@@ -122,9 +122,14 @@ 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
                return _pointIndices[idx]; // use point index mapping
        }