diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2021-01-06 01:35:42 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2021-01-12 13:34:34 +0100 |
commit | 054a89dd9e5d6819adede9d7ba781b69f98ff2f4 (patch) | |
tree | 820a104cae2d9e4ec912b0a1bd7debac52cf4cc9 /src/Protocol/ChunkDataSerializer.cpp | |
parent | Convert most calls to blocking GetHeight/GetBiomeAt to direct chunk accesses (diff) | |
download | cuberite-054a89dd9e5d6819adede9d7ba781b69f98ff2f4.tar cuberite-054a89dd9e5d6819adede9d7ba781b69f98ff2f4.tar.gz cuberite-054a89dd9e5d6819adede9d7ba781b69f98ff2f4.tar.bz2 cuberite-054a89dd9e5d6819adede9d7ba781b69f98ff2f4.tar.lz cuberite-054a89dd9e5d6819adede9d7ba781b69f98ff2f4.tar.xz cuberite-054a89dd9e5d6819adede9d7ba781b69f98ff2f4.tar.zst cuberite-054a89dd9e5d6819adede9d7ba781b69f98ff2f4.zip |
Diffstat (limited to 'src/Protocol/ChunkDataSerializer.cpp')
-rw-r--r-- | src/Protocol/ChunkDataSerializer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Protocol/ChunkDataSerializer.cpp b/src/Protocol/ChunkDataSerializer.cpp index a16cce02b..2c45eea58 100644 --- a/src/Protocol/ChunkDataSerializer.cpp +++ b/src/Protocol/ChunkDataSerializer.cpp @@ -74,7 +74,7 @@ cChunkDataSerializer::cChunkDataSerializer(const eDimension a_Dimension) : void cChunkDataSerializer::SendToClients(const int a_ChunkX, const int a_ChunkZ, const cChunkData & a_Data, const unsigned char * a_BiomeData, const ClientHandles & a_SendTo) { - for (const auto Client : a_SendTo) + for (const auto & Client : a_SendTo) { switch (static_cast<cProtocol::Version>(Client->GetProtocolVersion())) { @@ -133,7 +133,7 @@ void cChunkDataSerializer::SendToClients(const int a_ChunkX, const int a_ChunkZ, -inline void cChunkDataSerializer::Serialize(cClientHandle * a_Client, const int a_ChunkX, const int a_ChunkZ, const cChunkData & a_Data, const unsigned char * a_BiomeData, const CacheVersion a_CacheVersion) +inline void cChunkDataSerializer::Serialize(const ClientHandles::value_type & a_Client, const int a_ChunkX, const int a_ChunkZ, const cChunkData & a_Data, const unsigned char * a_BiomeData, const CacheVersion a_CacheVersion) { auto & Cache = m_Cache[static_cast<size_t>(a_CacheVersion)]; if (Cache.Engaged) |