tag/Item: made TagItem constructor private and friend TagPoolItem
To only allow construction as part of TagPoolItem with its special var size allocator in TagPoolItem::Create.
This commit is contained in:
@ -28,6 +28,10 @@ struct TagItem {
|
|||||||
type == other.type && std::strcmp(value, other.value) == 0;
|
type == other.type && std::strcmp(value, other.value) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
/* making the constructor private
|
||||||
|
to only allow construction by TagPoolItem. */
|
||||||
|
friend struct TagPoolItem;
|
||||||
TagItem() = default;
|
TagItem() = default;
|
||||||
TagItem(const TagItem &other) = delete;
|
TagItem(const TagItem &other) = delete;
|
||||||
TagItem &operator=(const TagItem &other) = delete;
|
TagItem &operator=(const TagItem &other) = delete;
|
||||||
|
Reference in New Issue
Block a user