From 83f030eeb0e339f9dd779251fb507756faaeb2e8 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Mon, 5 Jul 2021 15:17:29 +0200 Subject: [PATCH] Use reference to const for large input parameters. --- include/simgrid/jedule/jedule_platform.hpp | 2 +- src/instr/jedule/jedule_platform.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/simgrid/jedule/jedule_platform.hpp b/include/simgrid/jedule/jedule_platform.hpp index b7232c13d7..945f56127f 100644 --- a/include/simgrid/jedule/jedule_platform.hpp +++ b/include/simgrid/jedule/jedule_platform.hpp @@ -35,7 +35,7 @@ public: unsigned int get_id_by_name(const char* name) const { return name2id.at(name); } void add_child(Container* child); - void add_resources(std::vector hosts); + void add_resources(const std::vector& hosts); void create_hierarchy(const_sg_netzone_t from_as); std::vector get_hierarchy(); std::string get_hierarchy_as_string(); diff --git a/src/instr/jedule/jedule_platform.cpp b/src/instr/jedule/jedule_platform.cpp index 05a7b40922..00f78dad26 100644 --- a/src/instr/jedule/jedule_platform.cpp +++ b/src/instr/jedule/jedule_platform.cpp @@ -36,7 +36,7 @@ void Container::add_child(jed_container_t child) child->set_parent(this); } -void Container::add_resources(std::vector hosts) +void Container::add_resources(const std::vector& hosts) { children_.clear(); last_id_ = 0; @@ -144,7 +144,7 @@ void Container::print(FILE* jed_file) } // namespace jedule } // namespace simgrid -static void add_subsets_to(std::vector& subset_list, std::vector hostgroup, +static void add_subsets_to(std::vector& subset_list, const std::vector& hostgroup, jed_container_t parent) { // get ids for each host -- 2.20.1