rlenferink commented on a change in pull request #373: URL: https://github.com/apache/celix/pull/373#discussion_r725684163
########## File path: libs/framework/include/celix/ServiceRegistrationBuilder.h ########## @@ -69,22 +71,22 @@ namespace celix { * * If a key is already present the value will be overridden. */ - ServiceRegistrationBuilder& addProperty(std::string key, std::string value) { properties.set(std::move(key), std::move(value)); return *this; } + ServiceRegistrationBuilder& addProperty(const std::string& key, const std::string& value) { properties.set(key, value); return *this; } Review comment: Why prefer the `const &` over pass-by-value and move? See e.g. https://stackoverflow.com/a/51706522 As it read it, situation 0 - which this PR is changing to - is the scenario where most copies are made. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@celix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org