diff --git a/tests/BattleTests/ScriptTests/ScriptAggregatorTests.cpp b/tests/BattleTests/ScriptTests/ScriptAggregatorTests.cpp index 56757e7..4fa4440 100644 --- a/tests/BattleTests/ScriptTests/ScriptAggregatorTests.cpp +++ b/tests/BattleTests/ScriptTests/ScriptAggregatorTests.cpp @@ -12,7 +12,7 @@ private: ArbUt::StringView _name; public: - explicit TestScript(std::string name) : _name(std::move(name)){}; + explicit TestScript(const std::string& name) : _name(name.c_str(), name.length()){}; const ArbUt::StringView& GetName() const noexcept override { return _name; } void TestMethod(int& runCount) { runCount++; } diff --git a/tests/BattleTests/ScriptTests/ScriptSetTests.cpp b/tests/BattleTests/ScriptTests/ScriptSetTests.cpp index 80f5737..b9f850e 100644 --- a/tests/BattleTests/ScriptTests/ScriptSetTests.cpp +++ b/tests/BattleTests/ScriptTests/ScriptSetTests.cpp @@ -12,7 +12,7 @@ private: ArbUt::StringView _name; public: - explicit TestScript(std::string name) : _name(std::move(name)){}; + explicit TestScript(const std::string& name) : _name(name.c_str(), name.length()){}; const ArbUt::StringView& GetName() const noexcept override { return _name; } }; diff --git a/tests/BattleTests/ScriptTests/ScriptSourceTest.cpp b/tests/BattleTests/ScriptTests/ScriptSourceTest.cpp index 207eca1..193d5f2 100644 --- a/tests/BattleTests/ScriptTests/ScriptSourceTest.cpp +++ b/tests/BattleTests/ScriptTests/ScriptSourceTest.cpp @@ -13,7 +13,7 @@ private: ArbUt::StringView _name; public: - explicit TestScript(std::string name) : _name(std::move(name)){}; + explicit TestScript(const std::string& name) : _name(name.c_str(), name.length()){}; const ArbUt::StringView& GetName() const noexcept override { return _name; } void TestMethod(int& runCount) { runCount++; }