From b8739a773add021f95b478f496ff190dd1189a50 Mon Sep 17 00:00:00 2001 From: Sonja Happ Date: Mon, 16 Sep 2019 15:57:10 +0200 Subject: [PATCH] set initial values of hist class members in constructor; add a TODO case in put() function in for warmup==0 --- common/lib/hist.cpp | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/common/lib/hist.cpp b/common/lib/hist.cpp index f7e53dd26..effd3951c 100644 --- a/common/lib/hist.cpp +++ b/common/lib/hist.cpp @@ -22,6 +22,7 @@ #include #include +#include // for DBL_MAX #include #include @@ -33,9 +34,17 @@ using namespace villas::utils; namespace villas { Hist::Hist(int buckets, Hist::cnt_t wu) : - warmup(wu), - data(buckets) -{ } + warmup(wu) +{ + for ( int i = 0; i