Skip to content

Commit

Permalink
misc: use std::move instead of constructing a copy (#9415)
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Argueta <dereka@pinterest.com>
  • Loading branch information
derekargueta authored and lizan committed Dec 19, 2019
1 parent cdad62e commit bd6346f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion source/common/network/transport_socket_options_impl.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#include "common/network/transport_socket_options_impl.h"

#include <memory>
#include <string>
#include <utility>
#include <vector>

#include "common/common/scalar_to_byte_vector.h"
#include "common/common/utility.h"
#include "common/network/application_protocol.h"
@@ -40,7 +45,7 @@ TransportSocketOptionsUtility::fromFilterState(const StreamInfo::FilterState& fi

if (needs_transport_socket_options) {
return std::make_shared<Network::TransportSocketOptionsImpl>(
server_name, std::vector<std::string>{}, std::vector<std::string>{application_protocols});
server_name, std::vector<std::string>{}, std::move(application_protocols));
} else {
return nullptr;
}

0 comments on commit bd6346f

Please sign in to comment.