Skip to content

Commit 1828d26

Browse files
committed
Avoid one internal copy of the yaml tree
1 parent 2ddfcf2 commit 1828d26

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/core/io/src/4C_io_input_file.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -769,10 +769,8 @@ namespace Core::IO
769769
}
770770
}
771771

772-
std::stringstream ss;
773-
ss << tree_with_small_sections;
774-
std::string yaml_str = ss.str();
775-
Core::Communication::broadcast(yaml_str, /*root*/ 0, pimpl_->comm_);
772+
auto serialized_tree = ryml::emitrs_yaml<std::string>(tree_with_small_sections);
773+
Core::Communication::broadcast(serialized_tree, /*root*/ 0, pimpl_->comm_);
776774
}
777775
else
778776
{

0 commit comments

Comments
 (0)