CMaterial: std::move string in SetName()

Allows callers to avoid copies.
This commit is contained in:
Lioncash 2020-06-15 14:01:33 -04:00
parent e7b3015f08
commit b90bd90e03
1 changed files with 1 additions and 1 deletions

View File

@ -143,7 +143,7 @@ public:
CMaterial* GetNextDrawPass() const { return mpNextDrawPassMaterial.get(); }
CMaterial* GetBloomVersion() const { return mpBloomMaterial.get(); }
void SetName(const TString& rkName) { mName = rkName; }
void SetName(TString rkName) { mName = std::move(rkName); }
void SetOptions(FMaterialOptions Options) { mOptions = Options; Update(); }
void SetVertexDescription(FVertexDescription Desc) { mVtxDesc = Desc; Update(); }
void SetBlendMode(GLenum SrcFac, GLenum DstFac) { mBlendSrcFac = SrcFac; mBlendDstFac = DstFac; mRecalcHash = true; }