Do not convert node to string if not a scalar
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
YAML::Node operator >> (const YAML::Node& node, const YamlLookupTable& lut)
|
YAML::Node operator >> (const YAML::Node& node, const YamlLookupTable& lut)
|
||||||
{
|
{
|
||||||
if (node) {
|
if (node && node.IsScalar()) {
|
||||||
std::string str = node.as<std::string>();
|
std::string str = node.as<std::string>();
|
||||||
const auto& it =
|
const auto& it =
|
||||||
find_if(lut.begin(), lut.end(), [=](const YamlLookupTableElmt& elmt) {
|
find_if(lut.begin(), lut.end(), [=](const YamlLookupTableElmt& elmt) {
|
||||||
|
|||||||
Reference in New Issue
Block a user