86 | @@ -86,7 +87,7 @@ class CNetAddr
87 | bool GetIn6Addr(struct in6_addr* pipv6Addr) const;
88 |
89 | friend bool operator==(const CNetAddr& a, const CNetAddr& b);
90 | - friend bool operator!=(const CNetAddr& a, const CNetAddr& b);
91 | + friend bool operator!=(const CNetAddr& a, const CNetAddr& b) { return !(a == b); }
Just because negation is that obvious? I suspect this is some common coding practice?
In several different projects I have worked on this is a standard practice. It is simpler, less error-prone (in the case where someone updates operator== but forgets to update operator!=) and usually is also a LoC reduction.
This could be applied in other areas of the codebase as well but I didn't want to scope creep this PR.