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:
wrenczes@gmail.com
2011-04-28 07:49:51 +00:00
parent 8610531bf3
commit ba0f5c4191
3 changed files with 43 additions and 78 deletions
+4 -4
View File
@@ -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);