From 2c4f0c727823f5db3751d9c3c3eb63ad2ca637d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B6=93=E2=82=AC=E7=BB=BE=E8=B7=A8=E4=BC=92?= Date: Tue, 9 Aug 2022 13:21:53 +0800 Subject: [PATCH] Improve performance with std::move --- extensions/cocostudio/CCSpriteFrameCacheHelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/cocostudio/CCSpriteFrameCacheHelper.cpp b/extensions/cocostudio/CCSpriteFrameCacheHelper.cpp index 3c6abd6866..cc6250dbf5 100644 --- a/extensions/cocostudio/CCSpriteFrameCacheHelper.cpp +++ b/extensions/cocostudio/CCSpriteFrameCacheHelper.cpp @@ -72,7 +72,7 @@ void SpriteFrameCacheHelper::retainSpriteFrames(std::string_view plistPath) vec.emplace_back(spriteFrame); AX_SAFE_RETAIN(spriteFrame); } - _usingSpriteFrames[plistPath] = vec; + _usingSpriteFrames[plistPath] = std::move(vec); } void SpriteFrameCacheHelper::releaseSpriteFrames(std::string_view plistPath)