Simplifiying the cluster types handling

This commit is contained in:
emeric
2018-05-06 17:14:15 +02:00
parent a4969c134b
commit 57e745b460
9 changed files with 38 additions and 48 deletions
+4 -4
View File
@@ -30,8 +30,8 @@
namespace MetaData
{
AvFormat::AvFormat(const std::map<std::string, std::string>& clusterMap)
: _clusterMap(clusterMap)
AvFormat::AvFormat(const ClusterTypes& clusterTypes)
: Parser(clusterTypes)
{
}
@@ -155,13 +155,13 @@ AvFormat::parse(const boost::filesystem::path& p)
{
items.insert( std::make_pair(MetaData::Type::AcoustID, stringTrim(value)) );
}
else if (_clusterMap.find(tag) != _clusterMap.end())
else if (_clusterTypes.find(tag) != _clusterTypes.end())
{
std::vector<std::string> clusterNames = splitString(value, ";,\\");
if (!clusterNames.empty())
{
clusters[_clusterMap[tag]] = std::set<std::string>(clusterNames.begin(), clusterNames.end());
clusters[tag] = std::set<std::string>(clusterNames.begin(), clusterNames.end());
}
}