strbuffer: get rid of ostringstream

This commit is contained in:
Andrzej Rybczak
2012-08-28 08:10:16 +02:00
parent b910ce38be
commit eaabbee189
10 changed files with 128 additions and 48 deletions

View File

@@ -19,8 +19,6 @@
***************************************************************************/
#include <algorithm>
#include <sstream>
#include "conv.h"
int StrToInt(const std::string &str)
@@ -33,13 +31,6 @@ long StrToLong(const std::string &str)
return atol(str.c_str());
}
std::string IntoStr(int i)
{
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
{
switch (tag)
@@ -134,7 +125,7 @@ std::string IntoStr(const Action::Key &key, bool *print_backspace)
else if (key >= Action::Key(KEY_F1, ctNCurses) && key <= Action::Key(KEY_F12, ctNCurses))
{
result += "F";
result += IntoStr(key.getChar()-264);
result += intTo<std::string>::apply(key.getChar()-264);
}
else if ((key == Action::Key(KEY_BACKSPACE, ctNCurses) || key == Action::Key(KEY_BACKSPACE_2, ctStandard)))
{