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

This commit is contained in:
2020-06-26 17:08:23 +02:00
parent f50f76e993
commit 48639eeee5
44 changed files with 177 additions and 200 deletions

View File

@@ -3,7 +3,7 @@
#include <Arbutils/Collections/Dictionary.hpp>
#include <Arbutils/Collections/List.hpp>
#include <Arbutils/ConstString.hpp>
#include <Arbutils/StringView.hpp>
#include <numeric>
#include <unordered_set>
#include <vector>
@@ -16,7 +16,7 @@ namespace CreatureLib::Library {
public:
TypeLibrary(size_t initialCapacity = 20) : _types(ArbUt::Dictionary<uint32_t, uint8_t>(initialCapacity)) {}
inline uint8_t GetTypeId(const ArbUt::CaseInsensitiveConstString& key) const { return _types.Get(key); }
inline uint8_t GetTypeId(const ArbUt::BasicStringView& key) const { return _types.Get(key); }
inline uint8_t GetTypeId(uint32_t s) const { return _types.Get(s); }
[[nodiscard]] inline float GetSingleEffectiveness(uint8_t attacking, uint8_t defensive) const {
return _effectiveness[attacking][defensive];
@@ -29,7 +29,7 @@ namespace CreatureLib::Library {
});
}
uint8_t RegisterType(const ArbUt::CaseInsensitiveConstString& typeName);
uint8_t RegisterType(const ArbUt::StringView& typeName);
uint8_t RegisterType(uint32_t typeHash);
void SetEffectiveness(uint8_t attacking, uint8_t defensive, float effectiveness);
};