removed stringstream from client_test

This commit is contained in:
Arvid Norberg 2009-11-08 06:39:43 +00:00
parent e9e32235b4
commit fc3e8c28be
1 changed files with 3 additions and 6 deletions

View File

@ -196,12 +196,9 @@ char const* esc(char const* code)
std::string to_string(int v, int width)
{
std::stringstream s;
s.flags(std::ios_base::right);
s.width(width);
s.fill(' ');
s << v;
return s.str();
char buf[100];
snprintf(buf, sizeof(buf), "%*d", width, v);
return buf;
}
std::string& to_string(float v, int width, int precision = 3)