Fix overloaded equal operator of the NetworkDeviceMonitor
This commit is contained in:
parent
c6dc910f1a
commit
9ff93f9ecc
@ -176,12 +176,14 @@ bool NetworkDeviceMonitorImpl::isMyNetworkDeviceInfo(const NetworkDeviceInfo &ne
|
||||
return myNetworkDevice;
|
||||
}
|
||||
|
||||
bool NetworkDeviceMonitorImpl::operator==(NetworkDeviceMonitorImpl *other) const
|
||||
bool NetworkDeviceMonitorImpl::operator==(const NetworkDeviceMonitorImpl &other) const
|
||||
{
|
||||
return m_macAddress == other->macAddress() && m_hostName == other->hostName() && m_address == other->address();
|
||||
return m_macAddress == other.macAddress()
|
||||
&& m_hostName == other.hostName()
|
||||
&& m_address == other.address();
|
||||
}
|
||||
|
||||
bool NetworkDeviceMonitorImpl::operator!=(NetworkDeviceMonitorImpl *other) const
|
||||
bool NetworkDeviceMonitorImpl::operator!=(const NetworkDeviceMonitorImpl &other) const
|
||||
{
|
||||
return !operator==(other);
|
||||
}
|
||||
|
||||
@ -75,8 +75,8 @@ public:
|
||||
|
||||
bool isMyNetworkDeviceInfo(const NetworkDeviceInfo &networkDeviceInfo) const;
|
||||
|
||||
bool operator==(NetworkDeviceMonitorImpl *other) const;
|
||||
bool operator!=(NetworkDeviceMonitorImpl *other) const;
|
||||
bool operator==(const NetworkDeviceMonitorImpl &other) const;
|
||||
bool operator!=(const NetworkDeviceMonitorImpl &other) const;
|
||||
|
||||
private:
|
||||
MacAddress m_macAddress;
|
||||
|
||||
Reference in New Issue
Block a user