Adds support for script owner to clone command.
Some checks failed
continuous-integration/drone/push Build is failing

Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
2021-10-29 21:55:49 +02:00
parent be7a5fe6bd
commit cb6725ab5e
8 changed files with 12 additions and 12 deletions

View File

@@ -18,7 +18,7 @@ public:
void TestMethod(int& runCount) { runCount++; }
BattleScript* Clone() override { return new TestScript(_name); }
BattleScript* Clone(const ArbUt::OptionalBorrowedPtr<void>&) override { return new TestScript(_name); }
};
TEST_CASE("Script Aggregator properly iterates containing script.") {

View File

@@ -15,7 +15,7 @@ public:
explicit TestScript(const ArbUt::StringView& name) : BattleScript(nullptr), _name(name){};
const ArbUt::StringView& GetName() const noexcept override { return _name; }
BattleScript* Clone() override { return new TestScript(_name); }
BattleScript* Clone(const ArbUt::OptionalBorrowedPtr<void>&) override { return new TestScript(_name); }
};
TEST_CASE("Empty script set count == 0") {

View File

@@ -15,7 +15,7 @@ public:
const ArbUt::StringView& GetName() const noexcept override { return _name; }
void TestMethod(int& runCount) { runCount++; }
BattleScript* Clone() override { return new TestScript(_name); }
BattleScript* Clone(const ArbUt::OptionalBorrowedPtr<void>&) override { return new TestScript(_name); }
};
class ScriptSourceWithScriptPtr : public ScriptSource {