Converted CardPrimitive's basicAbilities from a map<int, int> to a bitset. With 92 abilities, that means our base container for abilities is now 16 bytes in size (down from 28), and is a fixed size, whereas the map would grow by 8 bytes per added ability.

This commit is contained in:
wrenczes@gmail.com
2011-04-26 09:35:38 +00:00
parent 425e49e608
commit a73fd4e99f
10 changed files with 74 additions and 90 deletions

View File

@@ -5,6 +5,7 @@
#include <string>
#include <vector>
#include <map>
#include <bitset>
#include "ManaCost.h"
#include "ObjectAnalytics.h"
@@ -35,7 +36,8 @@ public:
int init();
uint8_t colors;
map<int,int> basicAbilities;
std::bitset<Constants::NB_BASIC_ABILITIES> basicAbilities;
map<string,string> magicTexts;
string magicText;
int alias;