fixed the following use of a uninitialized variable

==30062== Conditional jump or move depends on uninitialised value(s)
==30062==    at 0x49070E: ElevationGain::perPoint(RideFilePoint const*, double, RideFile const*, Zones const*, int) (BasicRideMetrics.cpp:114)
==30062==    by 0x491592: PointwiseRideMetric::compute(RideFile const*, Zones const*, int, QHash<QString, RideMetric*> const&) (RideMetric.h:54)
This commit is contained in:
Greg Lonnon
2009-09-07 05:33:38 -06:00
committed by Sean Rhea
parent 29ad88de64
commit e7c7a43b8d

View File

@@ -102,7 +102,7 @@ class ElevationGain : public PointwiseRideMetric {
public:
ElevationGain() : elegain(0.0) {}
ElevationGain() : elegain(0.0), prevalt(0.0) {}
QString name() const { return "elevation_gain"; }
QString units(bool metric) const { return metric ? "meters" : "feet"; }
double value(bool metric) const {