Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DPL: Fix labeled array exception #5321

Merged
merged 2 commits into from
Jan 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ auto array2DFromBranch(boost::property_tree::ptree const& branch)
template <typename T>
auto labeledArrayFromBranch(boost::property_tree::ptree const& tree)
{
auto labels_rows = vectorFromBranch<std::string>(tree.get_child("labels_rows"));
auto labels_cols = vectorFromBranch<std::string>(tree.get_child("labels_cols"));
auto labels_rows = vectorFromBranch<std::string>(tree.get_child(labels_rows_str));
auto labels_cols = vectorFromBranch<std::string>(tree.get_child(labels_cols_str));
auto values = array2DFromBranch<T>(tree.get_child("values"));

return LabeledArray<T>{values, labels_rows, labels_cols};
Expand All @@ -103,8 +103,8 @@ template <typename T>
auto labeledArrayToBranch(LabeledArray<T>&& array)
{
boost::property_tree::ptree subtree;
subtree.put_child("labels_rows", vectorToBranch(array.getLabelsRows()));
subtree.put_child("lanels_cols", vectorToBranch(array.getLabelsCols()));
subtree.put_child(labels_rows_str, vectorToBranch(array.getLabelsRows()));
subtree.put_child(labels_cols_str, vectorToBranch(array.getLabelsCols()));
subtree.put_child("values", array2DToBranch(array.getData()));

return subtree;
Expand Down
5 changes: 0 additions & 5 deletions Framework/Core/src/PropertyTreeHelpers.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,6 @@ void PropertyTreeHelpers::populateDefaults(std::vector<ConfigParamSpec> const& s
}
}

namespace
{

} // namespace

void PropertyTreeHelpers::populate(std::vector<ConfigParamSpec> const& schema,
boost::property_tree::ptree& pt,
boost::program_options::variables_map const& vmap,
Expand Down