diff options
Diffstat (limited to 'src/tag/Tag.cxx')
-rw-r--r-- | src/tag/Tag.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/tag/Tag.cxx b/src/tag/Tag.cxx index 3da75ac0b..5abb6d7f1 100644 --- a/src/tag/Tag.cxx +++ b/src/tag/Tag.cxx @@ -53,11 +53,19 @@ Tag::Tag(const Tag &other) noexcept } } -std::unique_ptr<Tag> +Tag Tag::Merge(const Tag &base, const Tag &add) noexcept { TagBuilder builder(add); builder.Complement(base); + return builder.Commit(); +} + +std::unique_ptr<Tag> +Tag::MergePtr(const Tag &base, const Tag &add) noexcept +{ + TagBuilder builder(add); + builder.Complement(base); return builder.CommitNew(); } @@ -70,7 +78,7 @@ Tag::Merge(std::unique_ptr<Tag> base, std::unique_ptr<Tag> add) noexcept if (base == nullptr) return add; - return Merge(*base, *add); + return MergePtr(*base, *add); } const char * |