1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

hist: add default constructor

This commit is contained in:
Steffen Vogel 2019-06-03 18:12:56 +02:00
parent 6887e653c5
commit 627b5f316d
2 changed files with 2 additions and 2 deletions

View file

@ -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();

View file

@ -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]);