From 198407807f1241ea2b06179bcc036f9373c7258e Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sat, 12 Sep 2020 20:43:18 +0100 Subject: Reverse order of ChunkSender priorities (#4858) * Reduces confusion when using overloaded operator< and priority_queue Co-authored-by: peterbell10 --- src/ClientHandle.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ClientHandle.cpp') diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index 098a67afd..690998711 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -507,7 +507,7 @@ bool cClientHandle::StreamNextChunk(void) // Unloaded chunk found -> Send it to the client. Lock.Unlock(); - StreamChunk(ChunkX, ChunkZ, ((Range <= 2) ? cChunkSender::E_CHUNK_PRIORITY_HIGH : cChunkSender::E_CHUNK_PRIORITY_MEDIUM)); + StreamChunk(ChunkX, ChunkZ, ((Range <= 2) ? cChunkSender::Priority::Critical : cChunkSender::Priority::Medium)); return false; } } @@ -545,7 +545,7 @@ bool cClientHandle::StreamNextChunk(void) // Unloaded chunk found -> Send it to the client. Lock.Unlock(); - StreamChunk(Coords.m_ChunkX, Coords.m_ChunkZ, cChunkSender::E_CHUNK_PRIORITY_LOW); + StreamChunk(Coords.m_ChunkX, Coords.m_ChunkZ, cChunkSender::Priority::Low); return false; } } @@ -609,7 +609,7 @@ void cClientHandle::UnloadOutOfRangeChunks(void) -void cClientHandle::StreamChunk(int a_ChunkX, int a_ChunkZ, cChunkSender::eChunkPriority a_Priority) +void cClientHandle::StreamChunk(int a_ChunkX, int a_ChunkZ, cChunkSender::Priority a_Priority) { if (m_State >= csDestroying) { -- cgit v1.2.3