diff options
author | Max Kellermann <max@musicpd.org> | 2021-08-05 17:34:05 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2021-08-05 17:36:14 +0200 |
commit | a74b07728e935efb743b74665b9f922f731a0dac (patch) | |
tree | f0dfd4c80ba017a8b11101867cb98fb1086e627e /src/tag/Tag.hxx | |
parent | 7d69cbbda77df64d4387aa7dd5d75816044baade (diff) |
tag/Tag: add Merge() which takes Tag pointers
Diffstat (limited to 'src/tag/Tag.hxx')
-rw-r--r-- | src/tag/Tag.hxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tag/Tag.hxx b/src/tag/Tag.hxx index fca5ea284..aa409e2c1 100644 --- a/src/tag/Tag.hxx +++ b/src/tag/Tag.hxx @@ -133,6 +133,15 @@ struct Tag { std::unique_ptr<Tag> add) noexcept; /** + * Merges the data from two tags. Any of the two may be nullptr. + * + * @return a newly allocated tag (or nullptr if both + * parameters are nullptr) + */ + static std::unique_ptr<Tag> Merge(const Tag *base, + const Tag *add) noexcept; + + /** * Returns the first value of the specified tag type, or * nullptr if none is present in this tag object. */ |