Tweaks and fixes for TypeLibrary
This commit is contained in:
@@ -47,16 +47,18 @@ namespace CreatureLib::Library {
|
||||
return true;
|
||||
}
|
||||
|
||||
inline const T* Get(const Arbutils::CaseInsensitiveConstString& name) const {
|
||||
[[nodiscard]] inline const T* Get(const Arbutils::CaseInsensitiveConstString& name) const {
|
||||
return _values.at(name.GetHash());
|
||||
}
|
||||
inline const T* Get(uint32_t hashedKey) const { return _values.at(hashedKey); }
|
||||
[[nodiscard]] inline const T* Get(uint32_t hashedKey) const { return _values.at(hashedKey); }
|
||||
|
||||
inline const T* operator[](const Arbutils::CaseInsensitiveConstString& name) const { return Get(name); }
|
||||
inline const T* operator[](uint32_t hashedKey) const { return Get(hashedKey); }
|
||||
inline const std::unordered_map<uint32_t, const T*>& GetIterator() const { return _values; }
|
||||
[[nodiscard]] inline const T* operator[](const Arbutils::CaseInsensitiveConstString& name) const {
|
||||
return Get(name);
|
||||
}
|
||||
[[nodiscard]] inline const T* operator[](uint32_t hashedKey) const { return Get(hashedKey); }
|
||||
[[nodiscard]] inline const std::unordered_map<uint32_t, const T*>& GetIterator() const { return _values; }
|
||||
|
||||
size_t GetCount() const { return _values.size(); }
|
||||
[[nodiscard]] size_t GetCount() const { return _values.size(); }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user