diff --git a/libnymea/network/networkdeviceinfo.cpp b/libnymea/network/networkdeviceinfo.cpp index 6d36deec..64ba1e59 100644 --- a/libnymea/network/networkdeviceinfo.cpp +++ b/libnymea/network/networkdeviceinfo.cpp @@ -96,50 +96,6 @@ bool NetworkDeviceInfo::isValid() const return (!m_address.isNull() || !m_macAddress.isEmpty()) && m_networkInterface.isValid(); } -//bool NetworkDeviceInfo::operator!=(const NetworkDeviceInfo &other) const -//{ -// return !(*this == other); -//} - -//bool NetworkDeviceInfo::operator==(const NetworkDeviceInfo &other) const -//{ -// return m_address == other.address() && -// m_macAddress == other.macAddress() && -// m_macAddressManufacturer == other.macAddressManufacturer() && -// m_hostName == other.hostName(); -//} - -//bool NetworkDeviceInfo::operator<(const NetworkDeviceInfo &other) const -//{ - -// return m_address.toIPv4Address() < other.address().toIPv4Address(); -//} - -//bool NetworkDeviceInfo::operator<=(const NetworkDeviceInfo &other) const -//{ -// return m_address.toIPv4Address() <= other.address().toIPv4Address(); -//} - -//bool NetworkDeviceInfo::operator>(const NetworkDeviceInfo &other) const -//{ -// return m_address.toIPv4Address() > other.address().toIPv4Address(); -//} - -//bool NetworkDeviceInfo::operator>=(const NetworkDeviceInfo &other) const -//{ -// return m_address.toIPv4Address() != other.address().toIPv4Address(); -//} - -//bool NetworkDeviceInfo::operator-(const NetworkDeviceInfo &other) const -//{ -// return m_address.toIPv4Address() - other.address().toIPv4Address(); -//} - -//bool NetworkDeviceInfo::operator+(const NetworkDeviceInfo &other) const -//{ -// return m_address.toIPv4Address() + other.address().toIPv4Address(); -//} - QDebug operator<<(QDebug dbg, const NetworkDeviceInfo &networkDeviceInfo) { dbg.nospace() << "NetworkDeviceInfo(" << networkDeviceInfo.address().toString(); diff --git a/libnymea/network/networkdeviceinfo.h b/libnymea/network/networkdeviceinfo.h index 75285540..e6407e2b 100644 --- a/libnymea/network/networkdeviceinfo.h +++ b/libnymea/network/networkdeviceinfo.h @@ -62,13 +62,6 @@ public: bool isValid() const; -// bool operator!=(const NetworkDeviceInfo& other) const; -// bool operator==(const NetworkDeviceInfo& other) const; -// bool operator<(const NetworkDeviceInfo& other) const; -// bool operator<=(const NetworkDeviceInfo& other) const; -// bool operator>(const NetworkDeviceInfo& other) const; -// bool operator>=(const NetworkDeviceInfo& other) const; - private: QHostAddress m_address; QString m_macAddress; diff --git a/libnymea/network/networkdeviceinfos.cpp b/libnymea/network/networkdeviceinfos.cpp index 45edcec2..5d9def02 100644 --- a/libnymea/network/networkdeviceinfos.cpp +++ b/libnymea/network/networkdeviceinfos.cpp @@ -101,9 +101,9 @@ NetworkDeviceInfo NetworkDeviceInfos::get(const QString &macAddress) void NetworkDeviceInfos::sortNetworkDevices() { -// std::sort(*this->begin(), *this->end(), [](const NetworkDeviceInfo& a, const NetworkDeviceInfo& b) { -// return a.address().toIPv4Address() < b.address().toIPv4Address(); -// }); + std::sort(this->begin(), this->end(), [](const NetworkDeviceInfo& a, const NetworkDeviceInfo& b) { + return a.address().toIPv4Address() < b.address().toIPv4Address(); + }); } NetworkDeviceInfos &NetworkDeviceInfos::operator <<(const NetworkDeviceInfo &networkDeviceInfo)