CSceneNode: std::move string in SetName()

Allows for calling code to completely avoid copies being made.
This commit is contained in:
Lioncash 2020-06-15 13:48:54 -04:00
parent e962d9ba96
commit 28587fb622
1 changed files with 1 additions and 1 deletions

View File

@ -169,7 +169,7 @@ public:
bool InheritsScale() const { return _mInheritsScale; }
// Setters
void SetName(const TString& rkName) { mName = rkName; }
void SetName(TString rkName) { mName = std::move(rkName); }
void SetPosition(const CVector3f& rkPosition) { mPosition = rkPosition; MarkTransformChanged(); }
void SetRotation(const CQuaternion& rkRotation) { mRotation = rkRotation; MarkTransformChanged(); }
void SetRotation(const CVector3f& rkRotEuler) { mRotation = CQuaternion::FromEuler(rkRotEuler); MarkTransformChanged(); }