mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
Add missing copy constructor and assignment operators
This commit is contained in:
committed by
Klaus Basan
parent
3774f2b60f
commit
a36023f6d8
@@ -28,5 +28,16 @@ namespace BlackSimPlugin
|
||||
{
|
||||
SafeRelease(m_hostAddress);
|
||||
}
|
||||
|
||||
CHostNode &CHostNode::operator=(const CHostNode &other)
|
||||
{
|
||||
// check for self-assignment
|
||||
if(&other == this) { return *this; }
|
||||
|
||||
m_appDesc = other.m_appDesc;
|
||||
m_sessionName = other.m_sessionName;
|
||||
other.m_hostAddress->Duplicate(&m_hostAddress);
|
||||
return *this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,14 +52,15 @@ namespace BlackSimPlugin
|
||||
//! Set the session name
|
||||
void setSessionName(const QString &name) { m_sessionName = name; }
|
||||
|
||||
//! Copy assignment operator
|
||||
CHostNode &operator=(const CHostNode &other);
|
||||
|
||||
private:
|
||||
|
||||
IDirectPlay8Address *m_hostAddress = nullptr;
|
||||
DPN_APPLICATION_DESC m_appDesc;
|
||||
QString m_sessionName;
|
||||
|
||||
IDirectPlay8Address *m_hostAddress = nullptr;
|
||||
DPN_APPLICATION_DESC m_appDesc;
|
||||
QString m_sessionName;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif //BLACKSIMPLUGIN_FS9_HOST_NODE_H
|
||||
#endif //guard
|
||||
|
||||
Reference in New Issue
Block a user