format: implement generic format parser and printer

This commit is contained in:
Andrzej Rybczak
2014-11-10 00:31:53 +01:00
parent 25708093e6
commit 8d24c42261
31 changed files with 640 additions and 408 deletions

View File

@@ -178,10 +178,10 @@ void MutableSong::setMTime(time_t mtime)
m_mtime = mtime;
}
void MutableSong::setTags(SetFunction set, const std::string &value, const std::string &delimiter)
void MutableSong::setTags(SetFunction set, const std::string &value)
{
std::vector<std::string> tags;
boost::iter_split(tags, value, boost::first_finder(delimiter));
boost::iter_split(tags, value, boost::first_finder(Song::TagsSeparator));
size_t i = 0;
for (; i < tags.size(); ++i)
(this->*set)(tags[i], i);