diff --git a/common/include/villas/hist.hpp b/common/include/villas/hist.hpp index 33fa4549c..afc80b7d8 100644 --- a/common/include/villas/hist.hpp +++ b/common/include/villas/hist.hpp @@ -40,7 +40,7 @@ public: using cnt_t = uintmax_t; /** Initialize struct hist with supplied values and allocate memory for buckets. */ - Hist(int buckets, cnt_t warmup); + Hist(int buckets = 0, cnt_t warmup = 0); /** Free the dynamically allocated memory. */ ~Hist(); diff --git a/common/tests/unit/hist.cpp b/common/tests/unit/hist.cpp index 41ec005ef..e011b6a8a 100644 --- a/common/tests/unit/hist.cpp +++ b/common/tests/unit/hist.cpp @@ -33,7 +33,7 @@ TestSuite(hist, .description = "Histogram"); Test(hist, simple) { - Hist h(0, 0); + Hist h; for (unsigned i = 0; i < ARRAY_LEN(test_data); i++) h.put(test_data[i]);