summaryrefslogtreecommitdiff
path: root/src/tag
diff options
context:
space:
mode:
Diffstat (limited to 'src/tag')
-rw-r--r--src/tag/TagBuilder.cxx8
-rw-r--r--src/tag/TagBuilder.hxx6
2 files changed, 14 insertions, 0 deletions
diff --git a/src/tag/TagBuilder.cxx b/src/tag/TagBuilder.cxx
index 190307986..462f5c49a 100644
--- a/src/tag/TagBuilder.cxx
+++ b/src/tag/TagBuilder.cxx
@@ -133,6 +133,14 @@ TagBuilder::Commit(Tag &tag)
Clear();
}
+Tag
+TagBuilder::Commit()
+{
+ Tag tag;
+ Commit(tag);
+ return tag;
+}
+
Tag *
TagBuilder::CommitNew()
{
diff --git a/src/tag/TagBuilder.hxx b/src/tag/TagBuilder.hxx
index 302873ee4..984261ded 100644
--- a/src/tag/TagBuilder.hxx
+++ b/src/tag/TagBuilder.hxx
@@ -97,6 +97,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
* empty afterwards.