/*
- * Copyright (C) 1996-2014 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
}
StatHist::StatHist(const StatHist &src) :
- capacity_(src.capacity_), min_(src.min_), max_(src.max_),
- scale_(src.scale_), val_in(src.val_in), val_out(src.val_out)
+ bins(NULL),
+ capacity_(src.capacity_),
+ min_(src.min_),
+ max_(src.max_),
+ scale_(src.scale_),
+ val_in(src.val_in),
+ val_out(src.val_out)
{
if (src.bins!=NULL) {
bins = static_cast<bins_type *>(xcalloc(src.capacity_, sizeof(bins_type)));
unsigned int
StatHist::findBin(double v)
{
-
v -= min_; /* offset */
if (v <= 0.0) /* too small */