forked from upstream-mirrors/OpenTracks
Distance.ZERO as constant.
This commit is contained in:
+1
-1
@@ -65,7 +65,7 @@ public class AggregatedStatistics {
|
||||
this.countTracks = tracks.size();
|
||||
|
||||
totalMovingTime = tracks.stream().map(t -> t.getStatistics().movingTime()).reduce(Duration.ZERO, Duration::plus);
|
||||
totalDistance = tracks.stream().map(t -> t.getStatistics().totalDistance()).reduce(Distance.of(0), Distance::plus);
|
||||
totalDistance = tracks.stream().map(t -> t.getStatistics().totalDistance()).reduce(Distance.ZERO, Distance::plus);
|
||||
maxSpeed = tracks.stream().map(t -> t.getStatistics().maxSpeed()).max((o1, o2) -> (int) (o1.speed_mps() - o2.speed_mps())).orElse(Speed.ZERO);
|
||||
avgMovingSpeed = Speed.of(totalDistance, totalMovingTime);
|
||||
}
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ public class SettingsCustomLayoutEditAdapter extends RecyclerView.Adapter<Recycl
|
||||
Duration.ofMinutes(0),
|
||||
Duration.ofMinutes(0),
|
||||
|
||||
Distance.of(0),
|
||||
Distance.ZERO,
|
||||
Speed.ZERO,
|
||||
null,
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ public class IntervalStatisticsUpdater {
|
||||
//TODO Could be replaced with Statistics?
|
||||
@Deprecated
|
||||
private static class Interval {
|
||||
private Distance distance = Distance.of(0);
|
||||
private Distance distance = Distance.ZERO;
|
||||
private Duration time = Duration.ofSeconds(0);
|
||||
private Float gain_m;
|
||||
private Float loss_m;
|
||||
|
||||
Reference in New Issue
Block a user