From cba6293cf22e2c2ae17dd3954ad7d097f379c7ac Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 18 Mar 2011 23:02:54 +0000 Subject: Wow, a lot has changed. String is not a template class, and it can do it's own formatting ala QString. --- src/udpsocket.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/udpsocket.cpp') diff --git a/src/udpsocket.cpp b/src/udpsocket.cpp index b577302..055d584 100644 --- a/src/udpsocket.cpp +++ b/src/udpsocket.cpp @@ -83,15 +83,11 @@ Bu::UdpSocket::~UdpSocket() Bu::String Bu::UdpSocket::addrToStr( const addr &a ) { - Bu::String sOut; - sOut.format("%d.%d.%d.%d", - (a&0xff), - (a&0xff00)>>8, - (a&0xff0000)>>16, - (a&0xff000000)>>24 - ); - - return sOut; + return Bu::String("%1.%2.%3.%4"). + arg( (a&0xff) ). + arg( (a&0xff00)>>8 ). + arg( (a&0xff0000)>>16 ). + arg( (a&0xff000000)>>24 ); } void Bu::UdpSocket::close() -- cgit v1.2.3