diff options
author | Andrzej Rybczak <electricityispower@gmail.com> | 2012-08-28 03:54:40 +0200 |
---|---|---|
committer | Andrzej Rybczak <electricityispower@gmail.com> | 2012-08-28 03:54:40 +0200 |
commit | 4a0026052fdb00a33059cc72d7b02fb2c5c62dba (patch) | |
tree | d2d58ab19d4b03c2d2668b60db6e798358d24c55 | |
parent | 397783d7012b69a86cdb0d3009d25fab065ccff3 (diff) |
conv: use snprintf instead of ostringstream
-rw-r--r-- | src/conv.cpp | 8 |
1 files 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 |