tag/Pool: use C++11 initializers
This commit is contained in:
parent
6e6a0275b5
commit
b334643b68
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue