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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user