mirror of https://github.com/AxioDL/metaforce.git
CToken: std::move buildParams within CObjectReference's constructor
CVParamTransfer contains a std::shared_ptr, so a copy here performs an unnecessary reference count increment and decrement. We can std::move here to avoid this.
This commit is contained in:
parent
2014650d58
commit
541adb02d2
|
@ -16,7 +16,7 @@ u16 CObjectReference::RemoveReference() {
|
|||
|
||||
CObjectReference::CObjectReference(IObjectStore& objStore, std::unique_ptr<IObj>&& obj, const SObjectTag& objTag,
|
||||
CVParamTransfer buildParams)
|
||||
: x4_objTag(objTag), xC_objectStore(&objStore), x10_object(std::move(obj)), x14_params(buildParams) {}
|
||||
: x4_objTag(objTag), xC_objectStore(&objStore), x10_object(std::move(obj)), x14_params(std::move(buildParams)) {}
|
||||
CObjectReference::CObjectReference(std::unique_ptr<IObj>&& obj) : x10_object(std::move(obj)) {}
|
||||
|
||||
void CObjectReference::Unlock() {
|
||||
|
|
Loading…
Reference in New Issue