Pass item constructor flags by reference.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
317f616be2
commit
88a8a28cc6
|
@ -10,5 +10,5 @@ bool CreatureLib::Library::Item::HasFlag(uint32_t flag) const noexcept {
|
|||
CreatureLib::Library::Item::Item(const Arbutils::CaseInsensitiveConstString& name,
|
||||
CreatureLib::Library::ItemCategory category,
|
||||
CreatureLib::Library::BattleItemCategory battleCategory, int32_t price,
|
||||
std::unordered_set<uint32_t> flags)
|
||||
const std::unordered_set<uint32_t>& flags)
|
||||
: _name(name), _category(category), _battleCategory(battleCategory), _price(price), _flags(flags) {}
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace CreatureLib::Library {
|
|||
|
||||
public:
|
||||
Item(const Arbutils::CaseInsensitiveConstString& name, ItemCategory category, BattleItemCategory battleCategory,
|
||||
int32_t price, std::unordered_set<uint32_t> flags);
|
||||
int32_t price, const std::unordered_set<uint32_t>& flags);
|
||||
|
||||
inline const Arbutils::CaseInsensitiveConstString& GetName() const noexcept { return _name; }
|
||||
inline ItemCategory GetCategory() const noexcept { return _category; }
|
||||
|
|
Loading…
Reference in New Issue