diff options
Diffstat (limited to 'server/src/macroheaderparser.cc')
-rw-r--r-- | server/src/macroheaderparser.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/src/macroheaderparser.cc b/server/src/macroheaderparser.cc index c8d5fb2..3262888 100644 --- a/server/src/macroheaderparser.cc +++ b/server/src/macroheaderparser.cc @@ -92,13 +92,15 @@ MacroHeaderParser::~MacroHeaderParser() if(m) delete m; } -void MacroHeaderParser::startTag(std::string name, std::map< std::string, std::string> attributes) +void MacroHeaderParser::startTag(std::string name, attributes_t &attr) { if(m) return; if(name == "macro") { m = new Macro(); - m->attributes = attributes; + if(attr.find("name") != attr.end()) m->name = attr["name"]; + if(attr.find("version") != attr.end()) m->version = attr["version"]; + } else { throw Exception("Missing root tag 'macro' - found '" + name + "'"); } |