ColorizedStreamBuf::str: Append character prefix to stream directly

pull/158/head
Tatsuhiro Tsujikawa 2013-11-23 15:34:43 +09:00
parent 80528aa9ce
commit 03d5b4627b
1 changed files with 1 additions and 3 deletions

View File

@ -86,9 +86,7 @@ std::string ColorizedStreamBuf::str(bool color, size_t max) const
}
auto size = e.second.size();
if (size > max) {
auto cut = e.second;
cut.resize(max);
rv << cut;
rv.write(e.second.c_str(), max);
break;
}
rv << e.second;