pass Buffer/Window to ShowTag() by reference

returning new Buffer and passing it to Window by operator<<()
was rather bad idea since it required unnecessary copying.
This commit is contained in:
Andrzej Rybczak
2009-09-15 16:36:26 +00:00
parent 40b9b547dd
commit 27687fd2b1
7 changed files with 133 additions and 89 deletions

View File

@@ -367,16 +367,6 @@ std::string ExtractTopDirectory(const std::string &s)
return slash != std::string::npos ? s.substr(++slash) : s;
}
Buffer ShowTag(const std::string &tag)
{
Buffer result;
if (tag.empty())
result << Config.empty_tags_color << Config.empty_tag << clEnd;
else
result << tag;
return result;
}
#ifdef _UTF8
std::basic_string<my_char_t> Scroller(const std::string &str, size_t &pos, size_t width)
{