string host, serv;
if(str[0]=='[')
{
- unsigned bracket = str.find(']');
+ string::size_type bracket = str.find(']');
host = str.substr(1, bracket-1);
- unsigned colon = str.find(':', bracket);
+ string::size_type colon = str.find(':', bracket);
if(colon!=string::npos)
serv = str.substr(colon+1);
}
else
{
- unsigned colon = str.find(':');
+ string::size_type colon = str.find(':');
if(colon!=string::npos)
{
host = str.substr(0, colon);