start MinMaxAvg at default, not numeric limit

This commit is contained in:
Zach Pomerantz 2016-09-26 18:50:28 -07:00
parent 055fabf57b
commit 96e9399b89

View file

@ -21,16 +21,16 @@ template <typename T>
class MinMaxAvg {
public:
MinMaxAvg()
: _min(std::numeric_limits<T>::max()),
_max(std::numeric_limits<T>::min()),
: _min(T()),
_max(T()),
_average(0.0),
_samples(0),
_last(0)
{}
void reset() {
_min = std::numeric_limits<T>::max();
_max = std::numeric_limits<T>::min();
_min = T();
_max = T();
_average = 0.0;
_samples = 0;
_last = 0;