File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,14 +52,15 @@ namespace {
5252 std::vector<std::vector<std::string>>&& layer_path_strings)
5353 {
5454 using namespace phlex ::experimental;
55- auto layer_paths =
56- std::move (layer_path_strings) | std::views::transform ([](std::vector<std::string>& lp) {
57- auto lp_as_ids =
58- lp | std::views::transform ([](auto & str) { return identifier (std::move (str)); }) |
59- std::ranges::to<std::vector>();
60- return layer_path (std::move (lp_as_ids));
61- }) |
62- std::ranges::to<std::vector<layer_path>>();
55+ std::vector<layer_path> layer_paths;
56+ layer_paths.reserve (layer_path_strings.size ());
57+ for (auto & lp : layer_path_strings) {
58+ auto lp_as_ids =
59+ lp | std::views::as_rvalue |
60+ std::views::transform ([](std::string&& str) { return identifier (std::move (str)); }) |
61+ std::ranges::to<std::vector>();
62+ layer_paths.emplace_back (std::move (lp_as_ids));
63+ }
6364 return unique_paths (std::move (layer_paths));
6465 }
6566}
You can’t perform that action at this time.
0 commit comments