X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8a0e2b82a1c0981a84e67f1bb4afb6e16fbf8c3a..6bf993decaa5c52cf75ac9d187cdaaed4ec95614:/src/surf/PropertyHolder.cpp diff --git a/src/surf/PropertyHolder.cpp b/src/surf/PropertyHolder.cpp index 853bcb5522..39be42b685 100644 --- a/src/surf/PropertyHolder.cpp +++ b/src/surf/PropertyHolder.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2015-2018. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2015-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. */ @@ -13,7 +13,7 @@ PropertyHolder::~PropertyHolder() { } /** @brief Return the property associated to the provided key (or nullptr if not existing) */ -const char* PropertyHolder::get_property(std::string key) +const char* PropertyHolder::get_property(const std::string& key) { if (properties_ == nullptr) return nullptr; @@ -22,7 +22,7 @@ const char* PropertyHolder::get_property(std::string key) } /** @brief Change the value of a given key in the property set */ -void PropertyHolder::set_property(std::string key, std::string value) +void PropertyHolder::set_property(const std::string& key, const std::string& value) { if (not properties_) properties_ = new std::unordered_map;