diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:24:35 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:24:35 +0200 |
commit | 460091fb0b2ff114cc741372f15bb43b702ea3b1 (patch) | |
tree | 0562c2eda4c66969c6e6d0910080db9f5b0def3e /lib/generate_logfile.h | |
parent | 5.15 (diff) | |
download | FreeFileSync-460091fb0b2ff114cc741372f15bb43b702ea3b1.tar.gz FreeFileSync-460091fb0b2ff114cc741372f15bb43b702ea3b1.tar.bz2 FreeFileSync-460091fb0b2ff114cc741372f15bb43b702ea3b1.zip |
5.16
Diffstat (limited to 'lib/generate_logfile.h')
-rw-r--r-- | lib/generate_logfile.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/generate_logfile.h b/lib/generate_logfile.h index c441de66..31f7bd43 100644 --- a/lib/generate_logfile.h +++ b/lib/generate_logfile.h @@ -76,16 +76,17 @@ std::wstring generateLogHeader(const SummaryInfo& s) results.push_back(tabSpace + _("Total time:") + L" " + copyStringTo<std::wstring>(wxTimeSpan::Seconds(s.totalTime).Format())); - //calculate max width, this considers UTF-16 only, not true Unicode... + //calculate max width, this considers UTF-16 only, not true Unicode...but maybe good idea? those 2-char-UTF16 codes are usually wider than fixed width chars anyway! size_t sepLineLen = 0; std::for_each(results.begin(), results.end(), [&](const std::wstring& str) { sepLineLen = std::max(sepLineLen, str.size()); }); - for (size_t i = 0; i < sepLineLen; ++i) output += L'_'; //this considers UTF-16 only, not true Unicode!!! + output.resize(output.size() + sepLineLen + 1, L'_'); output += L'\n'; - std::for_each(results.begin(), results.end(), [&](const std::wstring& str) { output += str; output += L'\n'; }); + std::for_each(results.begin(), results.end(), [&](const std::wstring& str) { output += L'|'; output += str; output += L'\n'; }); - for (size_t i = 0; i < sepLineLen; ++i) output += L'_'; + output += L'|'; + output.resize(output.size() + sepLineLen, L'_'); output += L'\n'; return output; |