removed stringstream from client_test
This commit is contained in:
@@ -196,12 +196,9 @@ char const* esc(char const* code)
|
|||||||
|
|
||||||
std::string to_string(int v, int width)
|
std::string to_string(int v, int width)
|
||||||
{
|
{
|
||||||
std::stringstream s;
|
char buf[100];
|
||||||
s.flags(std::ios_base::right);
|
snprintf(buf, sizeof(buf), "%*d", width, v);
|
||||||
s.width(width);
|
return buf;
|
||||||
s.fill(' ');
|
|
||||||
s << v;
|
|
||||||
return s.str();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string& to_string(float v, int width, int precision = 3)
|
std::string& to_string(float v, int width, int precision = 3)
|
||||||
|
Reference in New Issue
Block a user