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

@@ -592,12 +592,9 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
attributefound = 1;
if (minus)
{
cd->basicAbilities[j] = -1;
}
else
{
cd->basicAbilities[j] = 1;
cd->mode = CD_NOT;
}
cd->basicAbilities.set(j);
}
}
}