X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/10f8a979e6fa1ee45d2aaf15b06743ec74759fe3..ebc355d0c96552d0bc2aa301d90723490337bca3:/src/s4u/s4u_Netzone.cpp diff --git a/src/s4u/s4u_Netzone.cpp b/src/s4u/s4u_Netzone.cpp index cc6071c322..0e3443dc9f 100644 --- a/src/s4u/s4u_Netzone.cpp +++ b/src/s4u/s4u_Netzone.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2018. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2006-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. */ @@ -33,13 +33,13 @@ std::unordered_map* NetZone::get_properties() } /** Retrieve the property value (or nullptr if not set) */ -const char* NetZone::get_property(std::string key) +const char* NetZone::get_property(const std::string& key) { return properties_.at(key).c_str(); } -void NetZone::set_property(std::string key, std::string value) +void NetZone::set_property(const std::string& key, const std::string& value) { - simgrid::simix::simcall([this, key, value] { properties_[key] = value; }); + simgrid::simix::simcall([this, &key, &value] { properties_[key] = value; }); } /** @brief Returns the list of direct children (no grand-children) */