Skip to content

Commit c475fb9

Browse files
generatedunixname1395027625275998meta-codesync[bot]
authored andcommitted
Avoid temporary string in getConfigFile via direct assign
Reviewed By: rjaber Differential Revision: D109101967 fbshipit-source-id: c824e0368dd74d9a65fceedd44c64406b83fa009
1 parent a6baf66 commit c475fb9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎mcrouter/ConfigApi.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ bool ConfigApi::getConfigFile(std::string& contents, std::string& path) {
298298
}
299299
if (!configStr.empty()) {
300300
path = shorten(configStr, 64);
301-
contents = configStr.str();
301+
contents.assign(configStr.data(), configStr.size());
302302
return true;
303303
}
304304
if (!opts_.config_str.empty()) {

0 commit comments

Comments
 (0)