diff options
author | tycho <work.tycho@gmail.com> | 2015-05-31 19:51:31 +0200 |
---|---|---|
committer | tycho <work.tycho@gmail.com> | 2015-06-05 23:31:22 +0200 |
commit | 9ebbe969c887d4fbb0c681b80eae589ce79dbd5d (patch) | |
tree | abfdf76c2cd59b260ba408078dfc00bea93a7198 /src/ChunkSender.cpp | |
parent | Rewrote ChunkSending queue for significantly improved performance (diff) | |
download | cuberite-9ebbe969c887d4fbb0c681b80eae589ce79dbd5d.tar cuberite-9ebbe969c887d4fbb0c681b80eae589ce79dbd5d.tar.gz cuberite-9ebbe969c887d4fbb0c681b80eae589ce79dbd5d.tar.bz2 cuberite-9ebbe969c887d4fbb0c681b80eae589ce79dbd5d.tar.lz cuberite-9ebbe969c887d4fbb0c681b80eae589ce79dbd5d.tar.xz cuberite-9ebbe969c887d4fbb0c681b80eae589ce79dbd5d.tar.zst cuberite-9ebbe969c887d4fbb0c681b80eae589ce79dbd5d.zip |
Diffstat (limited to 'src/ChunkSender.cpp')
-rw-r--r-- | src/ChunkSender.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ChunkSender.cpp b/src/ChunkSender.cpp index 43b65014a..5790accdb 100644 --- a/src/ChunkSender.cpp +++ b/src/ChunkSender.cpp @@ -31,7 +31,7 @@ class cNotifyChunkSender : { cChunkSender & ChunkSender = m_ChunkSender; m_World.DoWithChunk( - a_ChunkX, a_ChunkZ, + a_ChunkX, a_ChunkZ, [&ChunkSender] (cChunk & a_Chunk) -> bool { ChunkSender.QueueSendChunkTo(a_Chunk.GetPosX(), a_Chunk.GetPosZ(), cChunkSender::PRIORITY_BROADCAST, a_Chunk.GetAllClients()); @@ -161,7 +161,7 @@ void cChunkSender::RemoveClient(cClientHandle * a_Client) for (auto && pair : m_ChunkInfo) { auto && clients = pair.second.m_Clients; - clients.erase(a_Client); // nop for sets that do not contain a_Client + clients.erase(a_Client); // nop for sets that do not contain a_Client } m_RemoveCount++; @@ -222,9 +222,9 @@ void cChunkSender::SendChunk(int a_ChunkX, int a_ChunkZ, std::unordered_set<cCli { // Ask the client if it still wants the chunk: - for(auto itr = a_Clients.begin(); itr != a_Clients.end();) + for (auto itr = a_Clients.begin(); itr != a_Clients.end();) { - if(!(*itr)->WantsSendChunk(a_ChunkX, a_ChunkZ)) + if (!(*itr)->WantsSendChunk(a_ChunkX, a_ChunkZ)) { auto toremove = itr; itr++; |