Make typelibrary be based around the hash value instead of conststring value.
This commit is contained in:
@@ -16,6 +16,7 @@ float TypeLibrary::GetSingleEffectiveness(uint8_t attacking, uint8_t defensive)
|
||||
}
|
||||
|
||||
uint8_t TypeLibrary::GetTypeId(const ConstString& key) const { return _types.at(key); }
|
||||
uint8_t TypeLibrary::GetTypeId(uint32_t s) const { return _types.at(s); }
|
||||
|
||||
uint8_t TypeLibrary::RegisterType(const ConstString& key) {
|
||||
_types.insert({key, _types.size()});
|
||||
|
||||
Reference in New Issue
Block a user