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

@@ -119,7 +119,7 @@ void Battle::ValidateBattleState() {
this->_battleResult = BattleResult::Conclusive(winningSide);
this->_hasEnded = true;
}
void Battle::AddVolatileScript(const std::string& key) {
void Battle::AddVolatileScript(const ConstString& key) {
auto script = _volatile.Get(key);
if (script != nullptr) {
script->Stack();
@@ -129,6 +129,6 @@ void Battle::AddVolatileScript(const std::string& key) {
return _volatile.Add(script);
}
void Battle::AddVolatileScript(Script* script) { return _volatile.Add(script); }
void Battle::RemoveVolatileScript(const std::string& name) { _volatile.Remove(name); }
void Battle::RemoveVolatileScript(const ConstString& name) { _volatile.Remove(name); }
void Battle::RemoveVolatileScript(Script* script) { _volatile.Remove(script->GetName()); }
void Battle::HasVolatileScript(const std::string& name) const { _volatile.Has(name); }
void Battle::HasVolatileScript(const ConstString& name) const { _volatile.Has(name); }