Skip to content

Commit

Permalink
fix order
Browse files Browse the repository at this point in the history
Committed-by: xiaolei.zl from Dev container
  • Loading branch information
zhanglei1949 committed Dec 19, 2024
1 parent ba952b0 commit e21f231
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions flex/utils/yaml_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,20 @@ void convert_yaml_node_to_json(const YAML::Node& node,
json.SetInt(node.as<int>());
} catch (const YAML::BadConversion& e) {
try {
json.SetDouble(node.as<double>());
json.SetInt64(node.as<int64_t>());
} catch (const YAML::BadConversion& e) {
try {
json.SetBool(node.as<bool>());
json.SetUint64(node.as<uint64_t>());
} catch (const YAML::BadConversion& e) {
json.SetString(node.as<std::string>().c_str(), allocator);
try {
json.SetDouble(node.as<double>());
} catch (const YAML::BadConversion& e) {
try {
json.SetBool(node.as<bool>());
} catch (const YAML::BadConversion& e) {
json.SetString(node.as<std::string>().c_str(), allocator);
}
}
}
}
}
Expand Down

0 comments on commit e21f231

Please sign in to comment.