MCPcopy Create free account
hub / github.com/ddnet/ddnet / net_addr_comp

Function net_addr_comp

src/base/net.cpp:160–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158}
159
160int net_addr_comp(const NETADDR *a, const NETADDR *b)
161{
162 int diff = a->type - b->type;
163 if(diff != 0)
164 {
165 return diff;
166 }
167 diff = mem_comp(a->ip, b->ip, sizeof(a->ip));
168 if(diff != 0)
169 {
170 return diff;
171 }
172 return a->port - b->port;
173}
174
175bool NETADDR::operator==(const NETADDR &other) const
176{

Callers 12

RunFunction · 0.85
mainFunction · 0.85
UdpConnectivityMethod · 0.85
operator()Method · 0.85
Con_LeakIpAddressMethod · 0.85
IsRegisteredMethod · 0.85
FeedStunServerMethod · 0.85
GetClientSlotMethod · 0.85
TESTFunction · 0.85
operator==Method · 0.85
operator!=Method · 0.85
operator<Method · 0.85

Calls 1

mem_compFunction · 0.85

Tested by 1

TESTFunction · 0.68