From 88c01588aa0830e219eaa62588839e4d1e2883ce Mon Sep 17 00:00:00 2001 From: untodesu Date: Wed, 25 Jun 2025 00:44:36 +0500 Subject: Clang-format the entire source code --- game/shared/voxel_storage.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'game/shared/voxel_storage.cc') diff --git a/game/shared/voxel_storage.cc b/game/shared/voxel_storage.cc index eb51347..f2c4d42 100644 --- a/game/shared/voxel_storage.cc +++ b/game/shared/voxel_storage.cc @@ -1,9 +1,10 @@ #include "shared/pch.hh" + #include "shared/voxel_storage.hh" #include "core/buffer.hh" -void VoxelStorage::serialize(WriteBuffer &buffer) const +void VoxelStorage::serialize(WriteBuffer& buffer) const { auto bound = mz_compressBound(sizeof(VoxelStorage)); auto zdata = std::vector(bound); @@ -22,17 +23,19 @@ void VoxelStorage::serialize(WriteBuffer &buffer) const buffer.write_UI64(bound); // Write all the compressed data into the buffer - for(std::size_t i = 0; i < bound; buffer.write_UI8(zdata[i++])); + for(std::size_t i = 0; i < bound; buffer.write_UI8(zdata[i++])) + ; } -void VoxelStorage::deserialize(ReadBuffer &buffer) +void VoxelStorage::deserialize(ReadBuffer& buffer) { auto size = static_cast(sizeof(VoxelStorage)); auto bound = static_cast(buffer.read_UI64()); auto zdata = std::vector(bound); // Read all the compressed data from the buffer - for(std::size_t i = 0; i < bound; zdata[i++] = buffer.read_UI8()); + for(std::size_t i = 0; i < bound; zdata[i++] = buffer.read_UI8()) + ; mz_uncompress(reinterpret_cast(data()), &size, zdata.data(), bound); -- cgit