tag/TagBuilder: overload Commit() returning a Tag object

This commit is contained in:
Max Kellermann
2014-01-08 19:42:04 +01:00
parent ac1983eae3
commit bc23a6bb05
7 changed files with 24 additions and 12 deletions

View File

@@ -133,6 +133,14 @@ TagBuilder::Commit(Tag &tag)
Clear();
}
Tag
TagBuilder::Commit()
{
Tag tag;
Commit(tag);
return tag;
}
Tag *
TagBuilder::CommitNew()
{

View File

@@ -96,6 +96,12 @@ public:
*/
void Commit(Tag &tag);
/**
* Create a new #Tag instance from data in this object. This
* object is empty afterwards.
*/
Tag Commit();
/**
* Create a new #Tag instance from data in this object. The
* returned object is owned by the caller. This object is