From 7d2e4e199378977fa83ed7b3d2b1304bd597e35f Mon Sep 17 00:00:00 2001 From: Gosha <284210+Lordron@users.noreply.github.com> Date: Mon, 16 Oct 2023 03:23:01 +0300 Subject: [PATCH] Core/Cells: align Cell.data.Part fields by 8 bits and enlarge Cell structure to 8 bytes 8-bits align removes unneded shift operations --- src/server/game/Grids/Cells/Cell.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/server/game/Grids/Cells/Cell.h b/src/server/game/Grids/Cells/Cell.h index 0cd4f042aa..162c5499c3 100644 --- a/src/server/game/Grids/Cells/Cell.h +++ b/src/server/game/Grids/Cells/Cell.h @@ -96,14 +96,14 @@ struct Cell { struct { - unsigned grid_x : 6; - unsigned grid_y : 6; - unsigned cell_x : 6; - unsigned cell_y : 6; - unsigned nocreate : 1; - unsigned reserved : 7; + unsigned grid_x : 8; + unsigned grid_y : 8; + unsigned cell_x : 8; + unsigned cell_y : 8; + unsigned nocreate : 8; + unsigned reserved : 24; } Part; - uint32 All; + uint64 All; } data; template void Visit(CellCoord const&, TypeContainerVisitor& visitor, Map&, WorldObject const& obj, float radius) const;