conv: use snprintf instead of ostringstream

This commit is contained in:
Andrzej Rybczak
2012-08-28 03:54:40 +02:00
parent 397783d701
commit 4a0026052f

View File

@@ -33,11 +33,11 @@ long StrToLong(const std::string &str)
return atol(str.c_str()); return atol(str.c_str());
} }
std::string IntoStr(int l) std::string IntoStr(int i)
{ {
std::ostringstream ss; char buf[32];
ss << l; snprintf(buf, sizeof(buf), "%d", i);
return ss.str(); return buf;
} }
std::string IntoStr(mpd_tag_type tag) // this is only for left column's title in media library std::string IntoStr(mpd_tag_type tag) // this is only for left column's title in media library