Commit 3f315a46 authored by Steffen Vogel's avatar Steffen Vogel 🎅🏼

hist: add default constructor

parent 6c1fefea
......@@ -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();
......
......@@ -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]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment