Create scalar value string before passing to ParseScalar in ObjectParser
This commit is contained in:
parent
625e3a6f47
commit
325e9459fd
1 changed files with 3 additions and 1 deletions
|
@ -101,7 +101,9 @@ ObjectParser::HandleRadiusEvent(yaml_event_t& event)
|
|||
}
|
||||
|
||||
double radius;
|
||||
if (!ParseScalar<double>((char *)event.data.scalar.value, radius)) {
|
||||
std::string scalar((char *)event.data.scalar.value,
|
||||
event.data.scalar.length);
|
||||
if (!ParseScalar<double>(scalar, radius)) {
|
||||
/* TODO: Clean this up. */
|
||||
assert(false);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue