Reduced ManaCostHybrid's internals to uint8_t instead of ints. Removed the hardsized array of ManaCostHybrid pointers, and replaced it with a vector of objects, got rid of all the unnecessary new/delete code everywhere.
Also deleted "extraCostsIsCopy" from ManaCost - unused variable. Overall, drops ManaCost from 148 bytes to 120 (which in turn reduces CardPrimitive's memory footprint by the same amount, since it encapsulates a ManaCost).
This commit is contained in:
@@ -5,10 +5,10 @@ class ManaCostHybrid
|
||||
{
|
||||
|
||||
public:
|
||||
int color1;
|
||||
int color2;
|
||||
int value1;
|
||||
int value2;
|
||||
uint8_t color1;
|
||||
uint8_t color2;
|
||||
uint8_t value1;
|
||||
uint8_t value2;
|
||||
ManaCostHybrid();
|
||||
ManaCostHybrid(const ManaCostHybrid& hybridManaCost);
|
||||
ManaCostHybrid(const ManaCostHybrid* hybridManaCost);
|
||||
|
||||
Reference in New Issue
Block a user