mutable song: rename a few functions

This commit is contained in:
Andrzej Rybczak
2012-09-10 23:44:35 +02:00
parent 43778b3718
commit fe0d088faa
6 changed files with 22 additions and 23 deletions

View File

@@ -166,7 +166,7 @@ void MutableSong::setDuration(unsigned int duration)
m_duration = duration;
}
void MutableSong::setTag(SetFunction set, const std::string &value, const std::string &delimiter)
void MutableSong::setTags(SetFunction set, const std::string &value, const std::string &delimiter)
{
auto tags = split(value, delimiter);
for (size_t i = 0; i < tags.size(); ++i)
@@ -184,17 +184,6 @@ void MutableSong::clearModifications()
m_tags.clear();
}
std::string MutableSong::getTag(mpd_tag_type tag_type, std::function<std::string()> orig_value, unsigned idx) const
{
auto it = m_tags.find(Tag(tag_type, idx));
std::string result;
if (it == m_tags.end())
result = orig_value();
else
result = it->second;
return result;
}
void MutableSong::replaceTag(mpd_tag_type tag_type, std::string &&orig_value, const std::string &value, unsigned idx)
{
Tag tag(tag_type, idx);