Performance improvement for collecting scripts, by reserving size in ScriptSource.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-04-25 11:33:25 +02:00
parent 3b1c0e84e1
commit 734d056449
14 changed files with 26 additions and 0 deletions

View File

@@ -53,6 +53,7 @@ namespace CreatureLib::Battling {
const CreatureIndex& GetTarget() const noexcept { return _target; }
Script* GetAttackScript() const noexcept { return _attackScript; }
size_t ScriptCount() const override { return 1 + GetUser()->ScriptCount(); }
protected:
void GetActiveScripts(Arbutils::Collections::List<ScriptWrapper>& scripts) override {