mirror of https://github.com/oxen-io/lokinet
Combine empty + pop into single call
This commit is contained in:
parent
b03f3c2d79
commit
362fda5a56
|
@ -654,10 +654,9 @@ namespace llarp
|
|||
void
|
||||
Session::HandlePlaintext()
|
||||
{
|
||||
while (not m_PlaintextRecv.empty())
|
||||
while (auto maybe_queue = m_PlaintextRecv.tryPopFront())
|
||||
{
|
||||
auto queue = m_PlaintextRecv.popFront();
|
||||
for (auto& result : queue)
|
||||
for (auto& result : *maybe_queue)
|
||||
{
|
||||
LogTrace("Command ", int(result[PacketOverhead + 1]), " from ", m_RemoteAddr);
|
||||
switch (result[PacketOverhead + 1])
|
||||
|
|
Loading…
Reference in New Issue