summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-03-04 15:18:52 +0100
committerAndreas Stöckel <andreas@somweyr.de>2015-03-04 15:18:52 +0100
commit7b438c79af5450acc927add8ea8007aa25f7e691 (patch)
tree228ad71575cee0b8a5b09388d22d86dbc3e4b474
parent11c6272abc2b34d861620b906bdee595674dca0f (diff)
fixed bug #104
-rw-r--r--src/core/common/Logger.cpp1
-rw-r--r--src/formats/osml/OsmlParser.cpp3
-rw-r--r--src/formats/osml/OsmlStreamParser.cpp15
3 files changed, 11 insertions, 8 deletions
diff --git a/src/core/common/Logger.cpp b/src/core/common/Logger.cpp
index 54156f2..4df9ffc 100644
--- a/src/core/common/Logger.cpp
+++ b/src/core/common/Logger.cpp
@@ -249,7 +249,6 @@ void ConcreteLogger::reset()
{
locations.clear();
messageCounts.clear();
- sourceContextCallback = NullSourceContextCallback;
}
bool ConcreteLogger::hasError()
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);
}