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

This commit is contained in:
2020-07-04 15:50:30 +02:00
parent 698bc62b47
commit 7f1bc252ba
49 changed files with 207 additions and 237 deletions

View File

@@ -65,22 +65,22 @@ void RegisterBattleClass::RegisterBattle(asIScriptEngine* engine) {
Assert(r >= 0);
r = engine->RegisterObjectMethod(
"Battle", "void AddVolatile(const constString &in name) const",
asMETHODPR(PkmnLib::Battling::Battle, AddVolatileScript, (const ConstString&), void), asCALL_THISCALL);
asMETHODPR(PkmnLib::Battling::Battle, AddVolatileScript, (const ArbUt::StringView&), void), asCALL_THISCALL);
Assert(r >= 0);
r = engine->RegisterObjectMethod(
"Battle", "void RemoveVolatile(const constString &in name) const",
asMETHODPR(PkmnLib::Battling::Battle, RemoveVolatileScript, (const ConstString&), void), asCALL_THISCALL);
asMETHODPR(PkmnLib::Battling::Battle, RemoveVolatileScript, (const ArbUt::BasicStringView&), void),
asCALL_THISCALL);
Assert(r >= 0);
r = engine->RegisterObjectMethod("Battle", "void SetWeather(const constString &in name) const",
asMETHODPR(PkmnLib::Battling::Battle, SetWeather, (const ConstString&), void),
asCALL_THISCALL);
r = engine->RegisterObjectMethod(
"Battle", "void SetWeather(const constString &in name) const",
asMETHODPR(PkmnLib::Battling::Battle, SetWeather, (const ArbUt::StringView&), void), asCALL_THISCALL);
Assert(r >= 0);
r = engine->RegisterObjectMethod("Battle", "void ClearWeather(const constString &in name) const",
asMETHODPR(PkmnLib::Battling::Battle, ClearWeather, (), void), asCALL_THISCALL);
Assert(r >= 0);
r = engine->RegisterObjectMethod(
"Battle", "const constString& GetWeatherName() const",
asMETHODPR(PkmnLib::Battling::Battle, GetWeatherName, (), const ArbUt::CaseInsensitiveConstString&),
asCALL_THISCALL);
asMETHODPR(PkmnLib::Battling::Battle, GetWeatherName, (), const ArbUt::StringView&), asCALL_THISCALL);
Assert(r >= 0);
}

View File

@@ -21,10 +21,11 @@ void RegisterPokemonClass::RegisterDamageSource(asIScriptEngine* engine) {
[[maybe_unused]] int r = engine->RegisterEnum("DamageSource");
Assert(r >= 0);
for (auto v : CreatureLib::Battling::DamageSourceHelper::GetValues()) {
r = engine->RegisterEnumValue("DamageSource", CreatureLib::Battling::DamageSourceHelper::ToString(v), (int)v);
r = engine->RegisterEnumValue("DamageSource", CreatureLib::Battling::DamageSourceHelper::ToString(v).c_str(),
(int)v);
}
for (auto v : PkmnDamageSourceHelper::GetValues()) {
r = engine->RegisterEnumValue("DamageSource", PkmnDamageSourceHelper::ToString(v), (int)v);
r = engine->RegisterEnumValue("DamageSource", PkmnDamageSourceHelper::ToString(v).c_str(), (int)v);
}
Assert(r >= 0);
@@ -75,10 +76,12 @@ CScriptArray* GetMoves(const PkmnLib::Battling::Pokemon* obj) {
}
return nullptr;
}
static bool HasHeldItem(const PkmnLib::Battling::Pokemon* obj, const ConstString& str) {
static bool HasHeldItem(const PkmnLib::Battling::Pokemon* obj, const ArbUt::StringView& str) {
return obj->HasHeldItem(str.GetHash());
}
static std::string NicknameWrapper(const PkmnLib::Battling::Pokemon* obj) { return std::string(obj->GetNickname()); }
SMART_PTR_GETTER_FUNC(PkmnLib::Battling::Pokemon, const CreatureLib::Library::CreatureSpecies, GetSpecies);
SMART_PTR_GETTER_FUNC(PkmnLib::Battling::Pokemon, const PkmnLib::Library::PokemonForme, GetForme);
SMART_PTR_GETTER_FUNC(PkmnLib::Battling::Pokemon, const CreatureLib::Library::Item, GetHeldItem);
@@ -90,7 +93,7 @@ void RegisterPokemonClass::RegisterPokemonType(asIScriptEngine* engine) {
asFUNCTION(GetSpeciesWrapper), asCALL_CDECL_OBJLAST);
Assert(r >= 0);
r = engine->RegisterObjectMethod("Pokemon", "const Forme@ get_Forme() const property", asFUNCTION(GetFormeWrapper),
asCALL_CDECL_OBJLAST);
asCALL_CDECL_OBJFIRST);
Assert(r >= 0);
r = engine->RegisterObjectMethod("Pokemon", "uint8 get_Level() const property",
asMETHOD(PkmnLib::Battling::Pokemon, GetLevel), asCALL_THISCALL);
@@ -99,7 +102,7 @@ void RegisterPokemonClass::RegisterPokemonType(asIScriptEngine* engine) {
asMETHOD(PkmnLib::Battling::Pokemon, GetExperience), asCALL_THISCALL);
Assert(r >= 0);
r = engine->RegisterObjectMethod("Pokemon", "Gender get_Gender() const property", asFUNCTION(Pkmn_GenderWrapper),
asCALL_CDECL_OBJLAST);
asCALL_CDECL_OBJFIRST);
Assert(r >= 0);
r = engine->RegisterObjectMethod("Pokemon", "uint8 get_Coloring() const property",
asMETHOD(PkmnLib::Battling::Pokemon, GetColoring), asCALL_THISCALL);
@@ -108,15 +111,14 @@ void RegisterPokemonClass::RegisterPokemonType(asIScriptEngine* engine) {
asMETHOD(PkmnLib::Battling::Pokemon, IsShiny), asCALL_THISCALL);
Assert(r >= 0);
r = engine->RegisterObjectMethod("Pokemon", "const Item@ get_HeldItem() const property",
asFUNCTION(GetHeldItemWrapper), asCALL_CDECL_OBJLAST);
asFUNCTION(GetHeldItemWrapper), asCALL_CDECL_OBJFIRST);
Assert(r >= 0);
r = engine->RegisterObjectMethod("Pokemon", "bool HasHeldItem(const constString &in name) const",
asFUNCTION(HasHeldItem), asCALL_CDECL_OBJFIRST);
Assert(r >= 0);
r = engine->RegisterObjectMethod(
"Pokemon", "void SetHeldItem(const string &in name)",
asMETHODPR(PkmnLib::Battling::Pokemon, SetHeldItem, (const ArbUt::CaseInsensitiveConstString&), void),
asCALL_THISCALL);
asMETHODPR(PkmnLib::Battling::Pokemon, SetHeldItem, (const ArbUt::BasicStringView&), void), asCALL_THISCALL);
Assert(r >= 0);
r = engine->RegisterObjectMethod("Pokemon", "void SetHeldItem(const Item@ item)",
asMETHODPR(PkmnLib::Battling::Pokemon, SetHeldItem,
@@ -127,7 +129,7 @@ void RegisterPokemonClass::RegisterPokemonType(asIScriptEngine* engine) {
asMETHOD(PkmnLib::Battling::Pokemon, GetCurrentHealth), asCALL_THISCALL);
Assert(r >= 0);
r = engine->RegisterObjectMethod("Pokemon", "const string& get_Nickname() const property",
asMETHOD(PkmnLib::Battling::Pokemon, GetNickname), asCALL_THISCALL);
asFUNCTION(NicknameWrapper), asCALL_CDECL_OBJFIRST);
Assert(r >= 0);
r = engine->RegisterObjectMethod("Pokemon", "const constString& get_ActiveAbility() const property",
asMETHOD(PkmnLib::Battling::Pokemon, GetActiveTalent), asCALL_THISCALL);
@@ -151,7 +153,7 @@ void RegisterPokemonClass::RegisterPokemonType(asIScriptEngine* engine) {
asMETHOD(PkmnLib::Battling::Pokemon, OverrideActiveTalent), asCALL_THISCALL);
Assert(r >= 0);
r = engine->RegisterObjectMethod("Pokemon", "LearnedMove@[]@ GetMoves() const", asFUNCTION(GetMoves),
asCALL_CDECL_OBJLAST);
asCALL_CDECL_OBJFIRST);
Assert(r >= 0);
r = engine->RegisterObjectMethod("Pokemon", "void ChangeStatBoost(Statistic stat, int8 amount)",
asMETHOD(PkmnLib::Battling::Pokemon, ChangeStatBoost), asCALL_THISCALL);
@@ -176,10 +178,11 @@ void RegisterPokemonClass::RegisterPokemonType(asIScriptEngine* engine) {
Assert(r >= 0);
r = engine->RegisterObjectMethod(
"Pokemon", "void AddVolatile(const constString &in name) const",
asMETHODPR(PkmnLib::Battling::Pokemon, AddVolatileScript, (const ConstString&), void), asCALL_THISCALL);
asMETHODPR(PkmnLib::Battling::Pokemon, AddVolatileScript, (const ArbUt::StringView&), void), asCALL_THISCALL);
Assert(r >= 0);
r = engine->RegisterObjectMethod(
"Pokemon", "void RemoveVolatile(const constString &in name) const",
asMETHODPR(PkmnLib::Battling::Pokemon, RemoveVolatileScript, (const ConstString&), void), asCALL_THISCALL);
asMETHODPR(PkmnLib::Battling::Pokemon, RemoveVolatileScript, (const ArbUt::BasicStringView&), void),
asCALL_THISCALL);
Assert(r >= 0);
}

View File

@@ -1,18 +1,18 @@
#include "ConstString.hpp"
using ConstString = ArbUt::CaseInsensitiveConstString;
#include <Arbutils/StringView.hpp>
static void ConstructConstString(void* self) { new (self) ConstString(); }
static void CopyConstructConstString(const ConstString& other, void* self) { new (self) ConstString(other); }
static void DestructConstString(void* self) { ((ConstString*)self)->~ConstString(); }
static bool ConstStringEquality(const ConstString& a, const ConstString& b) { return a == b; }
static bool ConstStringStdStringEquality(const ConstString& a, const std::string& b) { return a == b; }
static ConstString ImplStdStringConstStringConv(const std::string& s) { return ConstString(s); }
static std::string ImplConstStringStdStringConv(const ConstString& s) { return s.std_str(); }
static uint32_t ImplConstStringHashConv(const ConstString& s) { return s.GetHash(); }
static void ConstructConstString(void* self) { new (self) ArbUt::StringView(); }
static void CopyConstructConstString(const ArbUt::StringView& other, void* self) {
new (self) ArbUt::StringView(other);
}
static void DestructConstString(void* self) { ((ArbUt::StringView*)self)->~StringView(); }
static bool ConstStringEquality(const ArbUt::StringView& a, const ArbUt::StringView& b) { return a == b; }
static bool ConstStringStdStringEquality(const ArbUt::StringView& a, const std::string& b) { return a == b; }
static uint32_t ImplConstStringHashConv(const ArbUt::StringView& s) { return s.GetHash(); }
void ConstStringRegister::Register(asIScriptEngine* engine) {
auto r = engine->RegisterObjectType("constString", sizeof(ArbUt::CaseInsensitiveConstString),
asOBJ_VALUE | asOBJ_APP_CLASS_CDAK);
auto r = engine->RegisterObjectType("constString", sizeof(ArbUt::StringView),
asOBJ_VALUE | asGetTypeTraits<ArbUt::StringView>());
Assert(r >= 0);
r = engine->RegisterObjectBehaviour("constString", asBEHAVE_CONSTRUCT, "void f()", asFUNCTION(ConstructConstString),
@@ -27,33 +27,24 @@ void ConstStringRegister::Register(asIScriptEngine* engine) {
asCALL_CDECL_OBJLAST);
Assert(r >= 0);
r = engine->RegisterObjectMethod("constString", "constString &opAssign(const constString &in)",
asMETHODPR(ConstString, operator=,(const ConstString&), ConstString&),
asCALL_THISCALL);
r = engine->RegisterObjectMethod(
"constString", "constString &opAssign(const constString &in)",
asMETHODPR(ArbUt::StringView, operator=, (const ArbUt::StringView&), ArbUt::StringView&), asCALL_THISCALL);
Assert(r >= 0);
r = engine->RegisterObjectMethod("constString", "bool opEquals(const constString &in) const",
asFUNCTIONPR(ConstStringEquality, (const ConstString&, const ConstString&), bool),
asCALL_CDECL_OBJFIRST);
r = engine->RegisterObjectMethod(
"constString", "bool opEquals(const constString &in) const",
asFUNCTIONPR(ConstStringEquality, (const ArbUt::StringView&, const ArbUt::StringView&), bool),
asCALL_CDECL_OBJFIRST);
Assert(r >= 0);
r = engine->RegisterObjectMethod(
"constString", "bool opEquals(const string &in) const",
asFUNCTIONPR(ConstStringStdStringEquality, (const ConstString&, const std::string&), bool),
asFUNCTIONPR(ConstStringStdStringEquality, (const ArbUt::StringView&, const std::string&), bool),
asCALL_CDECL_OBJFIRST);
Assert(r >= 0);
r = engine->RegisterObjectMethod("string", "constString opImplConv()",
asFUNCTIONPR(ImplStdStringConstStringConv, (const std::string&), ConstString),
asCALL_CDECL_OBJFIRST);
Assert(r >= 0);
r = engine->RegisterObjectMethod("constString", "string opImplConv()",
asFUNCTIONPR(ImplConstStringStdStringConv, (const ConstString&), std::string),
asCALL_CDECL_OBJFIRST);
Assert(r >= 0);
r = engine->RegisterObjectMethod("constString", "uint opImplConv()",
asFUNCTIONPR(ImplConstStringHashConv, (const ConstString&), uint32_t),
asFUNCTIONPR(ImplConstStringHashConv, (const ArbUt::StringView&), uint32_t),
asCALL_CDECL_OBJFIRST);
Assert(r >= 0);
}

View File

@@ -1,7 +1,6 @@
#ifndef PKMNLIB_CONSTSTRING_HPP
#define PKMNLIB_CONSTSTRING_HPP
#include <Arbutils/Assert.hpp>
#include <Arbutils/ConstString.hpp>
#include <angelscript.h>
class ConstStringRegister {
public:

View File

@@ -4,16 +4,14 @@
static CreatureLib::Library::EffectParameter* Ref_Factory() { return new CreatureLib::Library::EffectParameter(); }
static const ArbUt::CaseInsensitiveConstString& AsString(const CreatureLib::Library::EffectParameter* p) {
return p->AsString();
}
static const ArbUt::StringView& AsString(const CreatureLib::Library::EffectParameter* p) { return p->AsString(); }
void RegisterEffectParameter::Register(asIScriptEngine* engine) {
[[maybe_unused]] int r = engine->RegisterEnum("EffectParameterType");
Assert(r >= 0);
for (auto val : CreatureLib::Library::EffectParameterTypeHelper::GetValues()) {
r = engine->RegisterEnumValue("EffectParameterType",
CreatureLib::Library::EffectParameterTypeHelper::ToString(val), (int)val);
CreatureLib::Library::EffectParameterTypeHelper::ToString(val).c_str(), (int)val);
Assert(r >= 0);
}
@@ -36,9 +34,9 @@ void RegisterEffectParameter::Register(asIScriptEngine* engine) {
r = engine->RegisterObjectMethod("EffectParameter", "float AsFloat() const",
asMETHOD(CreatureLib::Library::EffectParameter, AsFloat), asCALL_THISCALL);
Assert(r >= 0);
r = engine->RegisterObjectMethod("EffectParameter", "const constString& AsString() const",
asFUNCTIONPR(AsString, (const CreatureLib::Library::EffectParameter*),
const ArbUt::CaseInsensitiveConstString&),
asCALL_CDECL_OBJFIRST);
r = engine->RegisterObjectMethod(
"EffectParameter", "const constString& AsString() const",
asFUNCTIONPR(AsString, (const CreatureLib::Library::EffectParameter*), const ArbUt::StringView&),
asCALL_CDECL_OBJFIRST);
Assert(r >= 0);
}

View File

@@ -18,11 +18,11 @@ void RegisterGrowthRateTypes::RegisterGrowthRateType(asIScriptEngine* engine) {
assert(r >= 0);
}
static uint8_t CalculateLevel(const CreatureLib::Library::GrowthRateLibrary* obj, const ConstString& str,
static uint8_t CalculateLevel(const CreatureLib::Library::GrowthRateLibrary* obj, const ArbUt::StringView& str,
uint32_t experience) {
return obj->CalculateLevel(str, experience);
}
static uint32_t CalculateExperience(const CreatureLib::Library::GrowthRateLibrary* obj, const ConstString& str,
static uint32_t CalculateExperience(const CreatureLib::Library::GrowthRateLibrary* obj, const ArbUt::StringView& str,
uint8_t level) {
return obj->CalculateExperience(str, level);
}

View File

@@ -58,9 +58,7 @@ void RegisterItemTypes::RegisterBattleItemCategoryEnum(asIScriptEngine* engine)
ENUM__SIZE_WRAPPER(Move_CategoryWrapper, PkmnLib::Library::Item, GetCategory)
ENUM__SIZE_WRAPPER(Move_BattleCategoryWrapper, PkmnLib::Library::Item, GetBattleCategory)
static bool HasFlag(const PkmnLib::Library::Item* obj, const ArbUt::CaseInsensitiveConstString& str) {
return obj->HasFlag(str);
}
static bool HasFlag(const PkmnLib::Library::Item* obj, const ArbUt::BasicStringView& str) { return obj->HasFlag(str); }
void RegisterItemTypes::RegisterItemType(asIScriptEngine* engine) {
[[maybe_unused]] int r = engine->RegisterObjectType("Item", 0, asOBJ_REF | asOBJ_NOCOUNT);

View File

@@ -1,5 +1,5 @@
#include "RegisterMoveTypes.hpp"
#include <cassert>
#include <Arbutils/Assert.hpp>
#include "../../../../Library/Moves/MoveData.hpp"
#include "../../../../Library/Moves/MoveLibrary.hpp"
@@ -12,11 +12,11 @@ void RegisterMoveTypes::Register(asIScriptEngine* engine) {
#define REGISTER_ENUM_VALUE(asName, cName, valueName) \
r = engine->RegisterEnumValue(#asName, #valueName, (int)cName::valueName); \
assert(r >= 0);
Assert(r >= 0);
void RegisterMoveTypes::RegisterMoveCategory(asIScriptEngine* engine) {
[[maybe_unused]] int r = engine->RegisterEnum("MoveCategory");
assert(r >= 0);
Assert(r >= 0);
REGISTER_ENUM_VALUE(MoveCategory, PkmnLib::Library::MoveCategory, Physical)
REGISTER_ENUM_VALUE(MoveCategory, PkmnLib::Library::MoveCategory, Special)
REGISTER_ENUM_VALUE(MoveCategory, PkmnLib::Library::MoveCategory, Status)
@@ -24,7 +24,7 @@ void RegisterMoveTypes::RegisterMoveCategory(asIScriptEngine* engine) {
void RegisterMoveTypes::RegisterMoveTarget(asIScriptEngine* engine) {
[[maybe_unused]] int r = engine->RegisterEnum("MoveTarget");
assert(r >= 0);
Assert(r >= 0);
REGISTER_ENUM_VALUE(MoveTarget, CreatureLib::Library::AttackTarget, Adjacent)
REGISTER_ENUM_VALUE(MoveTarget, CreatureLib::Library::AttackTarget, AdjacentAlly)
REGISTER_ENUM_VALUE(MoveTarget, CreatureLib::Library::AttackTarget, AdjacentAllySelf)
@@ -46,47 +46,47 @@ void RegisterMoveTypes::RegisterMoveTarget(asIScriptEngine* engine) {
ENUM__SIZE_WRAPPER(Move_CategoryWrapper, PkmnLib::Library::MoveData, GetCategory)
ENUM__SIZE_WRAPPER(Move_TargetWrapper, PkmnLib::Library::MoveData, GetTarget)
static bool HasFlag(const PkmnLib::Library::MoveData* obj, const ArbUt::CaseInsensitiveConstString& str) {
static bool HasFlag(const PkmnLib::Library::MoveData* obj, const ArbUt::BasicStringView& str) {
return obj->HasFlag(str);
}
void RegisterMoveTypes::RegisterMoveType(asIScriptEngine* engine) {
[[maybe_unused]] int r = engine->RegisterObjectType("MoveData", 0, asOBJ_REF | asOBJ_NOCOUNT);
assert(r >= 0);
Assert(r >= 0);
r = engine->RegisterObjectMethod("MoveData", "const constString& get_Name() const property",
asMETHOD(PkmnLib::Library::MoveData, GetName), asCALL_THISCALL);
assert(r >= 0);
Assert(r >= 0);
r = engine->RegisterObjectMethod("MoveData", "uint8 get_Type() const property",
asMETHOD(PkmnLib::Library::MoveData, GetType), asCALL_THISCALL);
assert(r >= 0);
Assert(r >= 0);
r = engine->RegisterObjectMethod("MoveData", "MoveCategory get_Category() const property",
asFUNCTION(Move_CategoryWrapper), asCALL_CDECL_OBJLAST);
assert(r >= 0);
Assert(r >= 0);
r = engine->RegisterObjectMethod("MoveData", "uint8 get_BasePower() const property",
asMETHOD(PkmnLib::Library::MoveData, GetBasePower), asCALL_THISCALL);
assert(r >= 0);
Assert(r >= 0);
r = engine->RegisterObjectMethod("MoveData", "uint8 get_Accuracy() const property",
asMETHOD(PkmnLib::Library::MoveData, GetAccuracy), asCALL_THISCALL);
assert(r >= 0);
Assert(r >= 0);
r = engine->RegisterObjectMethod("MoveData", "uint8 get_BaseUsages() const property",
asMETHOD(PkmnLib::Library::MoveData, GetBaseUsages), asCALL_THISCALL);
assert(r >= 0);
Assert(r >= 0);
r = engine->RegisterObjectMethod("MoveData", "MoveTarget get_Target() const property",
asFUNCTION(Move_TargetWrapper), asCALL_CDECL_OBJLAST);
assert(r >= 0);
Assert(r >= 0);
r = engine->RegisterObjectMethod("MoveData", "int8 get_Priority() const property",
asMETHOD(PkmnLib::Library::MoveData, GetPriority), asCALL_THISCALL);
assert(r >= 0);
Assert(r >= 0);
r = engine->RegisterObjectMethod("MoveData", "bool HasFlag(const constString &in flag) const", asFUNCTION(HasFlag),
asCALL_CDECL_OBJLAST);
assert(r >= 0);
Assert(r >= 0);
}
void RegisterMoveTypes::RegisterMoveLibrary(asIScriptEngine* engine) {
[[maybe_unused]] int r = engine->RegisterObjectType("MoveLibrary", 0, asOBJ_REF | asOBJ_NOCOUNT);
assert(r >= 0);
Assert(r >= 0);
r = engine->RegisterObjectMethod("MoveLibrary", "const MoveData@ Get(const constString &in name) const",
asMETHOD(PkmnLib::Library::MoveLibrary, Get), asCALL_THISCALL);
assert(r >= 0);
Assert(r >= 0);
}
#undef REGISTER_ENUM_VALUE

View File

@@ -43,7 +43,7 @@ void RegisterSpeciesTypes::RegisterStatisticEnum(asIScriptEngine* engine) {
static const PkmnLib::Library::PokemonForme* GetFormeWrapper(const std::string& s,
const PkmnLib::Library::PokemonSpecies* species) {
return species->GetForme(ArbUt::CaseInsensitiveConstString(s.c_str(), s.length()))
return species->GetForme(ArbUt::StringView(s.c_str(), s.length()))
.As<const PkmnLib::Library::PokemonForme>()
.GetRaw();
}
@@ -75,7 +75,7 @@ void RegisterSpeciesTypes::RegisterSpeciesType(asIScriptEngine* engine) {
assert(r >= 0);
}
const ArbUt::CaseInsensitiveConstString& GetAbility(PkmnLib::Library::PokemonForme* p, bool hidden, uint8_t index) {
const ArbUt::StringView& GetAbility(PkmnLib::Library::PokemonForme* p, bool hidden, uint8_t index) {
return p->GetAbility(CreatureLib::Library::TalentIndex(hidden, index));
}
@@ -106,7 +106,7 @@ void RegisterSpeciesTypes::RegisterFormeType(asIScriptEngine* engine) {
r = engine->RegisterObjectMethod("Forme", "const constString& GetAbility(bool hidden, uint8 index) const",
asFUNCTIONPR(GetAbility,
(PkmnLib::Library::PokemonForme * p, bool hidden, uint8_t index),
const ArbUt::CaseInsensitiveConstString&),
const ArbUt::StringView&),
asCALL_CDECL_OBJFIRST);
assert(r >= 0);
}

View File

@@ -4,7 +4,7 @@
void RegisterTypeLibrary::Register(asIScriptEngine* engine) { RegisterTypeLibraryType(engine); }
static bool GetTypeId(const CreatureLib::Library::TypeLibrary* obj, const ArbUt::CaseInsensitiveConstString& str) {
static bool GetTypeId(const CreatureLib::Library::TypeLibrary* obj, const ArbUt::BasicStringView& str) {
return obj->GetTypeId(str);
}