Jeck - Some cleanup, fixed a double-deletion error in GameStateDeckViewer (when unlocking all cards).

This commit is contained in:
wagic.jeck
2010-02-15 23:29:54 +00:00
parent 92979fb184
commit 62609ee1b1
4 changed files with 37 additions and 31 deletions

View File

@@ -45,6 +45,7 @@ void DeckDataWrapper::updateCounts(){
map<int,int>::iterator it;
for(int c=0;c<Constants::MTG_NB_COLORS;c++)
counts[c] = 0;
minCards = 65500;
for(int i=0;i<Size(true);i++){
for(int c=0;c<Constants::MTG_NB_COLORS;c++){
@@ -53,6 +54,9 @@ void DeckDataWrapper::updateCounts(){
it = copies.find(card->getMTGId());
if(it != copies.end())
counts[c]+=it->second;
if(it->second < minCards)
minCards = it->second;
}
}
}