diff options
author | Max Kellermann <max@duempel.org> | 2014-01-08 19:42:04 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-08 19:49:08 +0100 |
commit | bc23a6bb05705d5551117528dfcbfcfedfee4c90 (patch) | |
tree | 2283d2440ffa1bf6313c41ecaa59808032390769 /src/tag | |
parent | ac1983eae32caa7c6f10ec4bab32a9657bdb2668 (diff) |
tag/TagBuilder: overload Commit() returning a Tag object
Diffstat (limited to 'src/tag')
-rw-r--r-- | src/tag/TagBuilder.cxx | 8 | ||||
-rw-r--r-- | src/tag/TagBuilder.hxx | 6 |
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. |