copy elimination for ranges #part3

This commit is contained in:
brain5lug 2016-08-09 01:53:37 +03:00
parent 8b53ded53a
commit a530503c0c
9 changed files with 45 additions and 49 deletions

View file

@ -686,7 +686,7 @@ namespace client
{
{
std::lock_guard<std::mutex> lock(m_SocketsMutex);
for (auto sock : m_Sockets) {
for (auto& sock : m_Sockets) {
sock->CloseStream();
}
}
@ -719,7 +719,7 @@ namespace client
{
m_IsRunning = false;
m_Acceptor.cancel ();
for (auto it: m_Sessions)
for (auto& it: m_Sessions)
it.second->CloseStreams ();
m_Sessions.clear ();
m_Service.stop ();