avoid some object copies
This commit is contained in:
parent
014d43eb13
commit
92beef8348
@ -209,7 +209,7 @@ namespace ix
|
||||
|
||||
WebSocketHttpHeaders headers(_extraHeaders);
|
||||
std::string subProtocolsHeader;
|
||||
auto subProtocols = getSubProtocols();
|
||||
const auto &subProtocols = getSubProtocols();
|
||||
if (!subProtocols.empty())
|
||||
{
|
||||
//
|
||||
@ -219,7 +219,7 @@ namespace ix
|
||||
// 'json,msgpack'
|
||||
//
|
||||
int i = 0;
|
||||
for (auto subProtocol : subProtocols)
|
||||
for (const auto & subProtocol : subProtocols)
|
||||
{
|
||||
if (i++ != 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user