/* smpi_coll.c -- various optimized routing for collectives */
-/* Copyright (c) 2009-2018. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2009-2019. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#define COLL_SETTER(cat, ret, args, args2) \
int(*Colls::cat) args; \
- void Colls::set_##cat(std::string name) \
+ void Colls::set_##cat(const std::string& name) \
{ \
int id = find_coll_description(mpi_coll_##cat##_description, name, #cat); \
cat = reinterpret_cast<ret(*) args>(mpi_coll_##cat##_description[id].coll); \
XBT_WARN(" %s: %s\n", table[i].name.c_str(), table[i].description.c_str());
}
-int Colls::find_coll_description(s_mpi_coll_description_t* table, std::string name, const char* desc)
+int Colls::find_coll_description(s_mpi_coll_description_t* table, const std::string& name, const char* desc)
{
for (int i = 0; not table[i].name.empty(); i++)
if (name == table[i].name) {