mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
NetworkConnection: Prefer emplace to push.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user