From: tho Date: Mon, 24 Nov 2008 11:21:52 +0000 (+0000) Subject: INet4SocketAddress: unsigned/size_type bugfix for 64bit X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=26d3a25e9afa95c1daff06878a29e45cf811d18b;p=senf.git INet4SocketAddress: unsigned/size_type bugfix for 64bit git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@972 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Socket/Protocols/INet/INetAddressing.cc b/Socket/Protocols/INet/INetAddressing.cc index ef448a8..fdb4ee1 100644 --- a/Socket/Protocols/INet/INetAddressing.cc +++ b/Socket/Protocols/INet/INetAddressing.cc @@ -46,9 +46,9 @@ prefix_ senf::INet4SocketAddress::INet4SocketAddress(std::string const & addr) : BSDSocketAddress (sizeof(sockaddr_in), AF_INET) { - unsigned portIx = addr.find(':'); + std::string::size_type portIx = addr.find(':'); try { - port( boost::lexical_cast< ::u_int16_t >(portIx == std::string::npos + port( boost::lexical_cast< ::u_int16_t >(portIx == std::string::npos ? addr : std::string(addr,portIx+1)) ); } catch (boost::bad_lexical_cast const &) { @@ -88,7 +88,7 @@ prefix_ senf::INet6SocketAddress::INet6SocketAddress(std::string const & addr, ZoneId = 2, Hostname = 3, Port = 4 }; - + boost::smatch match; if (! regex_match(addr, match, addressRx)) throw AddressSyntaxException(); @@ -135,7 +135,7 @@ prefix_ void senf::INet6SocketAddress::assignIface(std::string const & iface) #undef prefix_ //#include "INetAddressing.mpp" - + // Local Variables: // mode: c++ // fill-column: 100