From c9270b65edcbabc237d4342c0003c5b051ddcb40 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 15 Jun 2020 19:55:40 -0400 Subject: [PATCH] CWorld: Make use of std::move in SetName() Allows calling code to avoid copies. --- src/Core/Resource/CWorld.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/Resource/CWorld.h b/src/Core/Resource/CWorld.h index 1e092639..46baf489 100644 --- a/src/Core/Resource/CWorld.h +++ b/src/Core/Resource/CWorld.h @@ -123,7 +123,7 @@ public: CStringTable* AreaName(uint32 AreaIndex) const { return mAreas[AreaIndex].pAreaName; } bool DoesAreaAllowPakDuplicates(uint32 AreaIndex) const { return mAreas[AreaIndex].AllowPakDuplicates; } - void SetName(const TString& rkName) { mName = rkName; } + void SetName(TString rkName) { mName = std::move(rkName); } void SetAreaAllowsPakDuplicates(uint32 AreaIndex, bool Allow) { mAreas[AreaIndex].AllowPakDuplicates = Allow; } };