Codechange: use NetworkAddress instead of two host/port variables where possible
This also means we no longer need last_host/last_port, but can just use a single last_joined setting.
This commit is contained in:

committed by
Patric Stout

parent
99f998805b
commit
be37a2cab8
@@ -101,8 +101,8 @@ void NetworkAddress::GetAddressAsString(char *buffer, const char *last, bool wit
|
||||
*/
|
||||
std::string NetworkAddress::GetAddressAsString(bool with_family)
|
||||
{
|
||||
/* 6 = for the : and 5 for the decimal port number */
|
||||
char buf[NETWORK_HOSTNAME_LENGTH + 6 + 7];
|
||||
/* 7 extra are for with_family, which adds " (IPvX)". */
|
||||
char buf[NETWORK_HOSTNAME_PORT_LENGTH + 7];
|
||||
this->GetAddressAsString(buf, lastof(buf), with_family);
|
||||
return buf;
|
||||
}
|
||||
|
Reference in New Issue
Block a user