Set shouldExpectKey after finishing radius; clean up asserts in ObjectParser
This commit is contained in:
parent
0ed3b524f4
commit
575ed822b4
1 changed files with 4 additions and 1 deletions
|
@ -76,6 +76,7 @@ void
|
||||||
ObjectParser::HandleColorEvent(yaml_event_t& event)
|
ObjectParser::HandleColorEvent(yaml_event_t& event)
|
||||||
{
|
{
|
||||||
if (event.type != YAML_SEQUENCE_START_EVENT) {
|
if (event.type != YAML_SEQUENCE_START_EVENT) {
|
||||||
|
/* TODO: Clean this up. */
|
||||||
assert(event.type != YAML_SEQUENCE_START_EVENT);
|
assert(event.type != YAML_SEQUENCE_START_EVENT);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -102,7 +103,8 @@ ObjectParser::HandleOriginEvent(yaml_event_t& event)
|
||||||
{
|
{
|
||||||
if (event.type != YAML_SEQUENCE_START_EVENT) {
|
if (event.type != YAML_SEQUENCE_START_EVENT) {
|
||||||
/* TODO: Clean this up. */
|
/* TODO: Clean this up. */
|
||||||
assert(false);
|
assert(event.type != YAML_SEQUENCE_START_EVENT);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto onDone = [this](std::vector<double> origin) {
|
auto onDone = [this](std::vector<double> origin) {
|
||||||
|
@ -136,6 +138,7 @@ ObjectParser::HandleRadiusEvent(yaml_event_t& event)
|
||||||
}
|
}
|
||||||
mObject->set_radius(radius);
|
mObject->set_radius(radius);
|
||||||
mSection = NoSection;
|
mSection = NoSection;
|
||||||
|
SetShouldExpectKey(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
} /* namespace yaml */
|
} /* namespace yaml */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue