Codechange: [ContentInfo] Use StringList for tags instead of custom allocations
This commit is contained in:
@@ -25,7 +25,7 @@ ContentInfo::ContentInfo()
|
||||
: /* Temporary... will be removed later in the PR. */
|
||||
type((ContentType)0), id((ContentID)0), filesize(0), filename(""), name(""), version(""),
|
||||
url(""), description(""), unique_id(0), md5sum(""), dependency_count(0), dependencies(nullptr),
|
||||
tag_count(0), tags(nullptr), state((State)0), upgrade(false)
|
||||
state((State)0), upgrade(false)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -33,7 +33,6 @@ ContentInfo::ContentInfo()
|
||||
ContentInfo::~ContentInfo()
|
||||
{
|
||||
free(this->dependencies);
|
||||
free(this->tags);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -44,10 +43,9 @@ void ContentInfo::TransferFrom(ContentInfo *other)
|
||||
{
|
||||
if (other != this) {
|
||||
free(this->dependencies);
|
||||
free(this->tags);
|
||||
*this = *other;
|
||||
other->dependencies = nullptr;
|
||||
other->tags = nullptr;
|
||||
other->tags.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user