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:
gd 2025-01-29 08:39:32 +02:00
parent 2a9c3a2e50
commit f15014b6af

@ -28,6 +28,10 @@ struct TagItem {
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(const TagItem &other) = delete;
TagItem &operator=(const TagItem &other) = delete;