mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
p2p, refactor: pass and use uint16_t CService::port as uint16_t
This commit is contained in:
@@ -107,7 +107,8 @@ std::vector<unsigned char> ParseHex(const std::string& str)
|
||||
return ParseHex(str.c_str());
|
||||
}
|
||||
|
||||
void SplitHostPort(std::string in, int &portOut, std::string &hostOut) {
|
||||
void SplitHostPort(std::string in, uint16_t& portOut, std::string& hostOut)
|
||||
{
|
||||
size_t colon = in.find_last_of(':');
|
||||
// if a : is found, and it either follows a [...], or no other : is in the string, treat it as port separator
|
||||
bool fHaveColon = colon != in.npos;
|
||||
|
||||
Reference in New Issue
Block a user