diff options
author | deva <deva> | 2010-01-14 14:11:27 +0000 |
---|---|---|
committer | deva <deva> | 2010-01-14 14:11:27 +0000 |
commit | 0485bd935b235e1162332ca145e7fbb6e5aecb3b (patch) | |
tree | 96708969f530428de2a9e01fd35dd97d5aa46893 /server/src/templatelist.cc | |
parent | 984d1dd9993aa5beffa4270b6421dea05ab04faa (diff) |
Made EntityList able to handle several files with same macroname and version number, without corrupting the internal data structure (switched from map to multimap).
Diffstat (limited to 'server/src/templatelist.cc')
-rw-r--r-- | server/src/templatelist.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/src/templatelist.cc b/server/src/templatelist.cc index b952467..0fc8ec5 100644 --- a/server/src/templatelist.cc +++ b/server/src/templatelist.cc @@ -44,7 +44,8 @@ void TemplateList::addFile(std::string file) try { parser.parse(); Template *templ = parser.getTemplate(); - (*this)[templ->attributes["name"]][VersionStr(templ->attributes["version"])] = file; + std::pair<VersionStr, std::string> p(VersionStr(templ->attributes["version"]), file); + (*this)[templ->attributes["name"]].insert(p); } catch(Exception &e) { PRACRO_WARN(templatelist, "Skipping %s: %s\n", file.c_str(), e.what()); } |