Commit b334643b authored by Max Kellermann's avatar Max Kellermann

tag/Pool: use C++11 initializers

parent 6e6a0275
...@@ -37,14 +37,14 @@ static constexpr size_t NUM_SLOTS = 4093; ...@@ -37,14 +37,14 @@ static constexpr size_t NUM_SLOTS = 4093;
struct TagPoolSlot { struct TagPoolSlot {
TagPoolSlot *next; TagPoolSlot *next;
uint8_t ref; uint8_t ref = 1;
TagItem item; TagItem item;
static constexpr unsigned MAX_REF = std::numeric_limits<decltype(ref)>::max(); static constexpr unsigned MAX_REF = std::numeric_limits<decltype(ref)>::max();
TagPoolSlot(TagPoolSlot *_next, TagType type, TagPoolSlot(TagPoolSlot *_next, TagType type,
StringView value) StringView value)
:next(_next), ref(1) { :next(_next) {
item.type = type; item.type = type;
memcpy(item.value, value.data, value.size); memcpy(item.value, value.data, value.size);
item.value[value.size] = 0; item.value[value.size] = 0;
......
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