Make typelibrary be based around the hash value instead of conststring value.

This commit is contained in:
2020-02-29 15:54:02 +01:00
parent 4341efb54c
commit 671077259e
2 changed files with 4 additions and 2 deletions

View File

@@ -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()});