From e9df5625e64093dc7ee3f19978aafce1cf2e1ad2 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 18 Jun 2020 04:48:13 -0400 Subject: [PATCH] CScriptLayer: std::move string in SetName() Allows calling code to avoid copies. --- src/Core/Resource/Script/CScriptLayer.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Core/Resource/Script/CScriptLayer.h b/src/Core/Resource/Script/CScriptLayer.h index 919012c8..340a3103 100644 --- a/src/Core/Resource/Script/CScriptLayer.h +++ b/src/Core/Resource/Script/CScriptLayer.h @@ -94,9 +94,9 @@ public: return nullptr; } - void SetName(const TString& rkName) { mLayerName = rkName; } - void SetActive(bool Active) { mActive = Active; } - void SetVisible(bool Visible) { mVisible = Visible; } + void SetName(TString rkName) { mLayerName = std::move(rkName); } + void SetActive(bool Active) { mActive = Active; } + void SetVisible(bool Visible) { mVisible = Visible; } uint32 AreaIndex() const {