summaryrefslogtreecommitdiff
path: root/server/src/macrolist.cc
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/macrolist.cc')
-rw-r--r--server/src/macrolist.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/server/src/macrolist.cc b/server/src/macrolist.cc
index 9dadb12..954149a 100644
--- a/server/src/macrolist.cc
+++ b/server/src/macrolist.cc
@@ -34,9 +34,9 @@
#include "debug.h"
MacroList::MacroList(std::string path)
- : EntityList("macro")
+ : EntityList(path, "macro")
{
- rescan(path);
+ rescan();
}
@@ -47,8 +47,9 @@ void MacroList::addFile(std::string file)
try {
parser.parse();
Macro *macro = parser.getMacro();
- std::pair<VersionStr, std::string> p(VersionStr(macro->attributes["version"]), file);
- (*this)[macro->attributes["name"]].insert(p);
+ insertEntity(macro->attributes["name"],
+ macro->attributes["version"],
+ file);
} catch(Exception &e) {
PRACRO_WARN(macrolist, "Skipping %s: %s\n", file.c_str(), e.what());
}