Fix for random value from library not working.
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
3ad21fecc2
commit
df37558ec0
|
@ -13,6 +13,7 @@ namespace CreatureLib::Library {
|
|||
template <class T> class BaseLibrary {
|
||||
Arbutils::Collections::Dictionary<uint32_t, const T*> _values;
|
||||
Arbutils::Collections::List<uint32_t> _listValues;
|
||||
size_t _index;
|
||||
|
||||
public:
|
||||
BaseLibrary(size_t initialCapacity = 32) : _values(initialCapacity), _listValues(initialCapacity) {}
|
||||
|
@ -27,12 +28,12 @@ namespace CreatureLib::Library {
|
|||
inline void Insert(const Arbutils::CaseInsensitiveConstString& key, const T* value) {
|
||||
AssertNotNull(value)
|
||||
_values.Insert(key.GetHash(), value);
|
||||
_listValues.Append(key);
|
||||
_listValues[_index++] = key;
|
||||
}
|
||||
inline void Insert(uint32_t hashedKey, const T* value) {
|
||||
AssertNotNull(value)
|
||||
_values.Insert(hashedKey, value);
|
||||
_listValues.Append(hashedKey);
|
||||
_listValues[_index++] = hashedKey;
|
||||
}
|
||||
|
||||
inline void Delete(const Arbutils::CaseInsensitiveConstString& key) {
|
||||
|
|
Loading…
Reference in New Issue