diff options
Diffstat (limited to 'src/formats')
-rw-r--r-- | src/formats/osml/OsmlParser.cpp | 3 | ||||
-rw-r--r-- | src/formats/osml/OsmlStreamParser.cpp | 15 |
2 files changed, 11 insertions, 7 deletions
diff --git a/src/formats/osml/OsmlParser.cpp b/src/formats/osml/OsmlParser.cpp index b5e5d8a..134eeb2 100644 --- a/src/formats/osml/OsmlParser.cpp +++ b/src/formats/osml/OsmlParser.cpp @@ -116,7 +116,8 @@ public: break; case OsmlStreamParser::State::ANNOTATION_END: { Variant elementName = Variant::fromString(std::string{}); - stack.annotationEnd(parser.getCommandName(), parser.getCommandArguments().asMap()); + stack.annotationEnd(parser.getCommandName(), + parser.getCommandArguments().asMap()); break; } case OsmlStreamParser::State::FIELD_START: diff --git a/src/formats/osml/OsmlStreamParser.cpp b/src/formats/osml/OsmlStreamParser.cpp index 64a489d..daf800a 100644 --- a/src/formats/osml/OsmlStreamParser.cpp +++ b/src/formats/osml/OsmlStreamParser.cpp @@ -289,17 +289,17 @@ private: Tokenizer tokenizer; /** - * Stack containing the current commands. - */ - std::stack<Command> commands; - - /** * Variant containing the tokenized data that was returned from the * tokenizer as data. */ TokenizedData data; /** + * Stack containing the current commands. + */ + std::stack<Command> commands; + + /** * Variable containing the current location of the parser. */ SourceLocation location; @@ -422,7 +422,10 @@ public: /* Class OsmlStreamParserImpl */ OsmlStreamParserImpl::OsmlStreamParserImpl(CharReader &reader, Logger &logger) - : reader(reader), logger(logger), tokenizer(OsmlTokens) + : reader(reader), + logger(logger), + tokenizer(OsmlTokens), + data(reader.getSourceId()) { commands.emplace("", Variant::mapType{}, true); } |