mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 13:44:56 +00:00
IVParamObj: Explicitly supply copy and move constructor/assingnment operators
Since the copy constructor is provided, we should explicitly specify the others to make behavior explicit (and prevent the copy constructor from being considered over the move constructor in certain scenarios).
This commit is contained in:
@@ -24,9 +24,15 @@ class CVParamTransfer {
|
||||
std::shared_ptr<IVParamObj> m_ref;
|
||||
|
||||
public:
|
||||
CVParamTransfer() = default;
|
||||
CVParamTransfer() noexcept = default;
|
||||
CVParamTransfer(IVParamObj* obj) : m_ref(obj) {}
|
||||
CVParamTransfer(const CVParamTransfer& other) : m_ref(other.m_ref) {}
|
||||
|
||||
CVParamTransfer(const CVParamTransfer& other) noexcept = default;
|
||||
CVParamTransfer& operator=(const CVParamTransfer&) noexcept = default;
|
||||
|
||||
CVParamTransfer(CVParamTransfer&&) noexcept = default;
|
||||
CVParamTransfer& operator=(CVParamTransfer&&) noexcept = default;
|
||||
|
||||
IVParamObj* GetObj() const { return m_ref.get(); }
|
||||
CVParamTransfer ShareTransferRef() const { return CVParamTransfer(*this); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user