mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Reduce size of Bonus struct from 320 bytes to 296 bytes.
- Internal enums were resized to occupy single byte. - Duration bitmask uses 16 bit integer directly instead of std::bitset<11> which consumed 8 bytes. - Fields shuffled to minimise padding and keep the most useful data on first 2 cache lines.
This commit is contained in:
@@ -19,7 +19,7 @@ class CBattleInfoCallback;
|
||||
struct BattleHex;
|
||||
class CStack;
|
||||
class PlayerColor;
|
||||
enum class BonusType;
|
||||
enum class BonusType : uint8_t;
|
||||
|
||||
namespace battle
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user