MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / operator <

Method operator <

base/poco/Net/src/IPAddress.cpp:353–366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

351
352
353bool IPAddress::operator < (const IPAddress& a) const
354{
355 poco_socklen_t l1 = length();
356 poco_socklen_t l2 = a.length();
357 if (l1 == l2)
358 {
359#if defined(POCO_HAVE_IPv6)
360 if ( scope() != a.scope() )
361 return scope() < a.scope();
362#endif
363 return std::memcmp(addr(), a.addr(), l1) < 0;
364 }
365 else return l1 < l2;
366}
367
368
369bool IPAddress::operator <= (const IPAddress& a) const

Callers

nothing calls this directly

Calls 3

lengthMethod · 0.45
scopeMethod · 0.45
addrMethod · 0.45

Tested by

no test coverage detected