Implements ConstString in several core places in the library, improving performance.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -86,7 +86,7 @@ namespace CreatureLib::Battling {
|
||||
return _heldItem != nullptr && _heldItem->GetName() == name;
|
||||
}
|
||||
inline const Library::Item* GetHeldItem() const { return _heldItem; }
|
||||
void SetHeldItem(const std::string& itemName);
|
||||
void SetHeldItem(const Arbutils::CaseInsensitiveConstString& itemName);
|
||||
inline void SetHeldItem(const Library::Item* item) { _heldItem = item; };
|
||||
|
||||
inline uint32_t GetCurrentHealth() const { return _currentHealth; }
|
||||
@@ -97,7 +97,7 @@ namespace CreatureLib::Battling {
|
||||
void SetOnBattleField(bool value) { _onBattleField = value; }
|
||||
bool IsOnBattleField() const { return _onBattleField; }
|
||||
|
||||
const std::string& GetNickname() const;
|
||||
const std::string& GetNickname() const { return _nickname; }
|
||||
const std::string& GetActiveTalent() const;
|
||||
|
||||
[[nodiscard]] bool IsFainted() const;
|
||||
|
||||
Reference in New Issue
Block a user