- added some cache for function getCardByName. On my machine, this divides the running time of the test suite by almost 2 (now runs in 12 minutes instead of 21)
This commit is contained in:
wagic.the.homebrew@gmail.com
2011-02-05 03:46:41 +00:00
parent cab5a99833
commit f6bef26243
2 changed files with 15 additions and 2 deletions

View File

@@ -125,6 +125,7 @@ public:
int totalCards();
int randomCardId();
private:
map<string, MTGCard *> mtgCardByNameCache;
int processConfLine(string &s, MTGCard* card, CardPrimitive * primitive);
bool addCardToCollection(MTGCard * card, int setId);
CardPrimitive * addPrimitive(CardPrimitive * primitive, MTGCard * card = NULL);