Removed some std::ostringstream.

To be continued.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5104 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-04-15 14:37:44 +00:00
parent 83bd45caa4
commit 470951d664
10 changed files with 136 additions and 191 deletions

View file

@ -25,8 +25,7 @@
#include "util/rsnet.h"
#include "util/rsthreads.h"
#include <string.h>
#include <sstream>
#include "util/rsstring.h"
#ifdef WINDOWS_SYS
#else
@ -141,12 +140,8 @@ std::ostream &operator<<(std::ostream &out, const struct sockaddr_in &addr)
std::string rs_inet_ntoa(struct in_addr in)
{
std::ostringstream str;
std::string str;
uint8_t *bytes = (uint8_t *) &(in.s_addr);
str << (int) bytes[0] << ".";
str << (int) bytes[1] << ".";
str << (int) bytes[2] << ".";
str << (int) bytes[3];
return str.str();
rs_sprintf(str, "%u.%u.%u.%u", (int) bytes[0], (int) bytes[1], (int) bytes[2], (int) bytes[3]);
return str;
}