Add ConstString to several other places where context isn't changed much during runtime.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-02-28 19:23:24 +01:00
parent 469fcfe280
commit 5a05a2f4d3
17 changed files with 73 additions and 85 deletions

View File

@@ -75,12 +75,12 @@ namespace CreatureLib::Battling {
inline const BattleResult& GetResult() const { return _battleResult; }
const std::vector<BattleSide*>& GetSides() const { return _sides; }
Script* GetVolatileScript(const std::string& key) const { return _volatile.Get(key); }
void AddVolatileScript(const std::string& key);
Script* GetVolatileScript(const ConstString& key) const { return _volatile.Get(key); }
void AddVolatileScript(const ConstString& key);
void AddVolatileScript(Script* script);
void RemoveVolatileScript(const std::string& name);
void RemoveVolatileScript(const ConstString& name);
void RemoveVolatileScript(Script* script);
void HasVolatileScript(const std::string& name) const;
void HasVolatileScript(const ConstString& name) const;
void RegisterEventListener(EVENT_HOOK_FUNC(listener)) { this->_eventHook.RegisterListener(listener); }
void TriggerEventListener(EventData* data) { this->_eventHook.TriggerEvent(data); }