mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-25 08:21:24 +02:00
util: add missing braces and apply clang format to SplitHostPort()
This commit is contained in:
parent
2875a764f7
commit
6f09c0f6b5
@ -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…
x
Reference in New Issue
Block a user