[PATCH 33 of 45] Move static operation out of loop

Wald Commits scm-commit at wald.intevation.org
Tue Mar 10 17:06:01 CET 2015


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1424102954 -3600
# Node ID 59b4f6cf1cf4483072d88e9fad6a3a39f7288cd5
# Parent  c62837ba37f313fc24d9e98b3d33215aa068b346
Move static operation out of loop.

diff -r c62837ba37f3 -r 59b4f6cf1cf4 artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityCalculation.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityCalculation.java	Mon Feb 16 15:58:52 2015 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityCalculation.java	Mon Feb 16 17:09:14 2015 +0100
@@ -191,11 +191,11 @@
         TDoubleArrayList location = new TDoubleArrayList();
         TDoubleArrayList avDiameterCap = new TDoubleArrayList();
         TDoubleArrayList avDiameterSub = new TDoubleArrayList();
+        QualityMeasurements capFiltered = filterCapMeasurements(qm);
+        QualityMeasurements subFiltered = filterSubMeasurements(qm);
+
         for (double km : kms) {
             //Filter cap and sub measurements.
-            QualityMeasurements capFiltered = filterCapMeasurements(qm);
-            QualityMeasurements subFiltered = filterSubMeasurements(qm);
-
             List<QualityMeasurement> cm = capFiltered.getMeasurements(km);
             List<QualityMeasurement> sm = subFiltered.getMeasurements(km);
 


More information about the Dive4Elements-commits mailing list