From 4a0026052fdb00a33059cc72d7b02fb2c5c62dba Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Tue, 28 Aug 2012 03:54:40 +0200 Subject: [PATCH] conv: use snprintf instead of ostringstream --- src/conv.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/conv.cpp b/src/conv.cpp index 8ea2ed5b..a6be4914 100644 --- a/src/conv.cpp +++ b/src/conv.cpp @@ -33,11 +33,11 @@ long StrToLong(const std::string &str) return atol(str.c_str()); } -std::string IntoStr(int l) +std::string IntoStr(int i) { - std::ostringstream ss; - ss << l; - return ss.str(); + char buf[32]; + snprintf(buf, sizeof(buf), "%d", i); + return buf; } std::string IntoStr(mpd_tag_type tag) // this is only for left column's title in media library