return values instead of playing around with static variables and references

This commit is contained in:
Andrzej Rybczak
2009-06-04 12:19:37 +02:00
parent 1e340211be
commit cd3180d265
4 changed files with 10 additions and 13 deletions

View File

@@ -363,11 +363,10 @@ void Info::PrepareSong(MPD::Song &s)
*w << fmtBold << "\nComment: " << fmtBoldEnd << ShowTag(s.GetComment());
}
const basic_buffer<my_char_t> &Info::ShowTag(const string &tag)
basic_buffer<my_char_t> Info::ShowTag(const string &tag)
{
# ifdef _UTF8
static WBuffer result;
result.Clear();
WBuffer result;
if (tag.empty())
result << Config.empty_tags_color << ToWString(Config.empty_tag) << clEnd;
else