util: add missing braces and apply clang format to SplitHostPort()

pull/826/head
Jon Atack 4 years ago
parent 2875a764f7
commit 6f09c0f6b5
No known key found for this signature in database
GPG Key ID: 4F5721B3D0E3921D

@ -121,11 +121,12 @@ void SplitHostPort(std::string in, uint16_t& portOut, std::string& hostOut)
portOut = n;
}
}
if (in.size()>0 && in[0] == '[' && in[in.size()-1] == ']')
if (in.size() > 0 && in[0] == '[' && in[in.size() - 1] == ']') {
hostOut = in.substr(1, in.size() - 2);
else
} else {
hostOut = in;
}
}
std::string EncodeBase64(Span<const unsigned char> input)
{

Loading…
Cancel
Save