]> git.tdb.fi Git - libs/net.git/blobdiff - source/net/resolve.cpp
Use string::size_type to store string offsets
[libs/net.git] / source / net / resolve.cpp
index 8f5c97b9baa25f6fdd2d32ce74929260772789b9..88497faa4b2dead177bcb72f54dceee72713ee77 100644 (file)
@@ -54,15 +54,15 @@ SockAddr *resolve(const string &str, Family family)
        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);