From fc3e8c28be668ae66f63a191f616315485f9c49a Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 8 Nov 2009 06:39:43 +0000 Subject: [PATCH] removed stringstream from client_test --- examples/client_test.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/examples/client_test.cpp b/examples/client_test.cpp index 34ad65491..3b7c548a4 100644 --- a/examples/client_test.cpp +++ b/examples/client_test.cpp @@ -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)