diff --git a/src/Core/GameProject/CGameProject.cpp b/src/Core/GameProject/CGameProject.cpp index 90074143..8817478b 100644 --- a/src/Core/GameProject/CGameProject.cpp +++ b/src/Core/GameProject/CGameProject.cpp @@ -62,7 +62,7 @@ bool CGameProject::Serialize(IArchive& rArc) TString PackageName = packagePath.GetFileName(false); TString PackageDir = packagePath.GetFileDirectory(); - auto pPackage = std::make_unique(this, PackageName, PackageDir); + auto pPackage = std::make_unique(this, std::move(PackageName), std::move(PackageDir)); const bool PackageLoadSuccess = pPackage->Load(); mPackages.push_back(std::move(pPackage)); diff --git a/src/Core/GameProject/CPackage.h b/src/Core/GameProject/CPackage.h index e17742e5..14c5464d 100644 --- a/src/Core/GameProject/CPackage.h +++ b/src/Core/GameProject/CPackage.h @@ -46,10 +46,10 @@ class CPackage public: CPackage() = default; - CPackage(CGameProject *pProj, const TString& rkName, const TString& rkPath) + CPackage(CGameProject *pProj, TString rkName, TString rkPath) : mpProject(pProj) - , mPakName(rkName) - , mPakPath(rkPath) + , mPakName(std::move(rkName)) + , mPakPath(std::move(rkPath)) , mCacheDirty(true) {}