summaryrefslogtreecommitdiffstats
path: root/src/Protocol/ChunkDataSerializer.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-01-06 01:35:42 +0100
committerTiger Wang <ziwei.tiger@outlook.com>2021-01-12 13:34:34 +0100
commit054a89dd9e5d6819adede9d7ba781b69f98ff2f4 (patch)
tree820a104cae2d9e4ec912b0a1bd7debac52cf4cc9 /src/Protocol/ChunkDataSerializer.h
parentConvert most calls to blocking GetHeight/GetBiomeAt to direct chunk accesses (diff)
downloadcuberite-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.h')
-rw-r--r--src/Protocol/ChunkDataSerializer.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Protocol/ChunkDataSerializer.h b/src/Protocol/ChunkDataSerializer.h
index ea0b0be11..47d92e2ee 100644
--- a/src/Protocol/ChunkDataSerializer.h
+++ b/src/Protocol/ChunkDataSerializer.h
@@ -21,7 +21,7 @@ Caches the serialized data for as long as this object lives, so that the same da
other clients using the same protocol. */
class cChunkDataSerializer
{
- using ClientHandles = std::unordered_set<cClientHandle *>;
+ using ClientHandles = std::vector<std::shared_ptr<cClientHandle>>;
/** Enum to collapse protocol versions into a contiguous index. */
enum class CacheVersion
@@ -55,7 +55,7 @@ private:
/** Serialises the given chunk, storing the result into the given cache entry, and sends the data.
If the cache entry is already present, simply re-uses it. */
- inline void Serialize(cClientHandle * a_Client, int a_ChunkX, int a_ChunkZ, const cChunkData & a_Data, const unsigned char * a_BiomeData, CacheVersion a_CacheVersion);
+ inline void Serialize(const ClientHandles::value_type & a_Client, int a_ChunkX, int a_ChunkZ, const cChunkData & a_Data, const unsigned char * a_BiomeData, CacheVersion a_CacheVersion);
inline void Serialize47 (int a_ChunkX, int a_ChunkZ, const cChunkData & a_Data, const unsigned char * a_BiomeData); // Release 1.8
inline void Serialize107(int a_ChunkX, int a_ChunkZ, const cChunkData & a_Data, const unsigned char * a_BiomeData); // Release 1.9