NetworkConnection: Prefer emplace to push.

This commit is contained in:
Peter Johnson
2015-07-25 10:45:01 -07:00
parent 787d39851b
commit 3c7cb363ba

View File

@@ -56,9 +56,9 @@ void NetworkConnection::ReadThreadMain() {
if (m_stream) m_stream->close();
break;
}
m_incoming.push(msg);
m_incoming.emplace(std::move(msg));
}
m_incoming.push(nullptr); // notify anyone waiting that we disconnected
m_incoming.emplace(nullptr); // notify anyone waiting that we disconnected
m_active = false;
}