Update to newer Arbutils version.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-05-26 18:31:06 +02:00
parent d746b3ecce
commit 25f65eb47b
68 changed files with 334 additions and 354 deletions

View File

@@ -8,8 +8,8 @@
namespace CreatureLib::Battling {
class ScriptSet {
Arbutils::Collections::List<Script*> _scripts;
Arbutils::Collections::Dictionary<uint32_t, size_t> _lookup;
ArbUt::List<Script*> _scripts;
ArbUt::Dictionary<uint32_t, size_t> _lookup;
public:
~ScriptSet() {
@@ -33,7 +33,7 @@ namespace CreatureLib::Battling {
_lookup.Insert(script->GetName(), _scripts.Count() - 1);
}
Script* Get(const ConstString& key) const { return Get(key.GetHash()); }
Script* Get(const ArbUt::CaseInsensitiveConstString& key) const { return Get(key.GetHash()); }
Script* Get(uint32_t keyHash) const noexcept {
size_t v;
@@ -43,7 +43,7 @@ namespace CreatureLib::Battling {
return nullptr;
}
void Remove(const ConstString& key) { Remove(key.GetHash()); }
void Remove(const ArbUt::CaseInsensitiveConstString& key) { Remove(key.GetHash()); }
void Remove(uint32_t keyHash) {
size_t v;
@@ -65,13 +65,13 @@ namespace CreatureLib::Battling {
_lookup.Clear();
}
bool Has(const ConstString& key) const { return _lookup.Has(key); }
bool Has(const ArbUt::CaseInsensitiveConstString& key) const { return _lookup.Has(key); }
bool Has(uint32_t keyHash) const { return _lookup.Has(keyHash); }
inline size_t Count() const { return _scripts.Count(); }
const Arbutils::Collections::List<Script*>* GetIterator() const { return &_scripts; }
const ArbUt::List<Script*>* GetIterator() const { return &_scripts; }
};
}