Hid Subtypes behind MTGAllCards and added a mutex to be able to use both singleton from several threads.

This commit is contained in:
Xawotihs@gmail.com
2012-02-12 22:20:05 +00:00
parent ebc4eb331f
commit bd1afebbea
15 changed files with 74 additions and 54 deletions
+3 -3
View File
@@ -2506,13 +2506,13 @@ public:
size_t found = s.find(" ");
if (found != string::npos)
{
int id = Subtypes::subtypesList->find(s.substr(0, found));
int id = MTGAllCards::findType(s.substr(0, found));
types.push_back(id);
s = s.substr(found + 1);
}
else
{
int id = Subtypes::subtypesList->find(s);
int id = MTGAllCards::findType(s);
types.push_back(id);
s = "";
}
@@ -5066,6 +5066,6 @@ public:
void PopulateColorIndexVector(list<int>& colors, const string& colorsString, char delimiter = ',');
void PopulateAbilityIndexVector(list<int>& abilities, const string& abilitiesString, char delimiter = ',');
void PopulateSubtypesIndexVector(list<int>& subtypes, const string& subtypesString, char delimiter = ' ');
void PopulateSubtypesIndexVector(list<int>& types, const string& subtypesString, char delimiter = ' ');
#endif