changed Subtypes map into a vector, hoping for some speed improvements.

This commit is contained in:
wagic.the.homebrew
2011-05-09 13:56:22 +00:00
parent 7447a451eb
commit b1ea63cd79
2 changed files with 22 additions and 15 deletions

View File

@@ -35,18 +35,18 @@ public:
protected:
map<string, int> values;
vector<string> valuesById;
map<int,int> subtypesToType;
vector<unsigned int> subtypesToType;
public:
static Subtypes * subtypesList;
Subtypes();
int find(string subtype, bool forceAdd = true);
string find(unsigned int id);
bool isSubtypeOfType(string subtype, string type);
bool isSubtypeOfType(int subtype, int type);
bool isSuperType(int type);
bool isType(int type);
bool isSubType(int type);
int add(string value, int parentType);
bool isSubtypeOfType(unsigned int subtype, unsigned int type);
bool isSuperType(unsigned int type);
bool isType(unsigned int type);
bool isSubType(unsigned int type);
int add(string value, unsigned int parentType);
const vector<string> getValuesById();
};