Fixed constness of std::vector<std::reference_wrapper<const ItemEnchantInfo>> for GetAllEnchantsAffectingAbility() function.
All checks were successful
Emscripten Build / Build_and_Deploy_Web_Build (push) Successful in 7m8s
All checks were successful
Emscripten Build / Build_and_Deploy_Web_Build (push) Successful in 7m8s
This commit is contained in:
parent
2447a6bbb1
commit
8c8567017c
@ -365,11 +365,11 @@ const bool ItemEnchant::HasAttributes()const{
|
||||
const std::optional<Class>&ItemEnchant::GetClass()const{
|
||||
return ItemEnchantInfo::GetEnchant(Name()).GetClass();
|
||||
}
|
||||
const std::vector<std::reference_wrapper<ItemEnchantInfo>>ItemEnchantInfo::GetAllEnchantsAffectingAbility(const std::string_view ability){
|
||||
std::vector<std::reference_wrapper<ItemEnchantInfo>>enchantsAffectingList{};
|
||||
const std::vector<std::reference_wrapper<const ItemEnchantInfo>>ItemEnchantInfo::GetAllEnchantsAffectingAbility(const std::string_view ability){
|
||||
std::vector<std::reference_wrapper<const ItemEnchantInfo>>enchantsAffectingList{};
|
||||
for(const auto&enchantName:game->GetPlayer()->GetEnchants()){
|
||||
const ItemEnchantInfo&enchant{ItemEnchantInfo::GetEnchant(enchantName)};
|
||||
if(enchant.GetAbility()&&(*enchant.GetAbility())->GetName()==ability)enchantsAffectingList.emplace_back(std::ref(enchant));
|
||||
if(enchant.GetAbility()&&(*enchant.GetAbility())->GetName()==ability)enchantsAffectingList.emplace_back(std::cref(enchant));
|
||||
}
|
||||
return enchantsAffectingList;
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ public:
|
||||
const float GetConfigValue(const std::string_view keyName)const;
|
||||
const float operator[](const std::string&name)const;
|
||||
const AbilityDescriptionModifiers GetModifiers()const;
|
||||
static const std::vector<std::reference_wrapper<ItemEnchantInfo>>GetAllEnchantsAffectingAbility(const std::string_view ability);
|
||||
static const std::vector<std::reference_wrapper<const ItemEnchantInfo>>GetAllEnchantsAffectingAbility(const std::string_view ability);
|
||||
private:
|
||||
class ItemEnchantCategoryData{
|
||||
friend class ItemEnchantInfo;
|
||||
|
@ -39,7 +39,7 @@ All rights reserved.
|
||||
#define VERSION_MAJOR 1
|
||||
#define VERSION_MINOR 3
|
||||
#define VERSION_PATCH 0
|
||||
#define VERSION_BUILD 12151
|
||||
#define VERSION_BUILD 12153
|
||||
|
||||
#define stringify(a) stringify_(a)
|
||||
#define stringify_(a) #a
|
||||
|
Loading…
x
Reference in New Issue
Block a user