# HG changeset patch # User Felix Wolfsteller # Date 1379587991 -7200 # Node ID b17634649e6119460d3fa808780b60e41c17f3be # Parent fabb5e7a3b66ac84b9db11f35335be8e48fc8c9f Simplify code a bit. diff -r fabb5e7a3b66 -r b17634649e61 artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java --- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java Thu Sep 19 12:52:06 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java Thu Sep 19 12:53:11 2013 +0200 @@ -243,23 +243,16 @@ resLoad.setDescription(""); resLoad.setEpoch(true); - SedimentLoadResult result; SedimentLoad sl = calculateTotalLoad(resLoad, this.epoch[i][0]); + if (this.unit.equals("m3_per_a")) { - SedimentLoad slu = calculateUnit(sl, this.epoch[i][0]); - result = new SedimentLoadResult( - this.epoch[i][0], - this.epoch[i][1], - slu); - } - else { - result = new SedimentLoadResult( - this.epoch[i][0], - this.epoch[i][1], - sl); + sl = calculateUnit(sl, this.epoch[i][0]); } - return result; + return new SedimentLoadResult( + this.epoch[i][0], + this.epoch[i][1], + sl); } /**