summaryrefslogtreecommitdiff
path: root/library/error_log.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'library/error_log.cpp')
-rw-r--r--library/error_log.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/library/error_log.cpp b/library/error_log.cpp
index a78b1c9a..eef8572a 100644
--- a/library/error_log.cpp
+++ b/library/error_log.cpp
@@ -73,14 +73,19 @@ wxString ErrorLogging::formatMessage(const Entry& msg)
break;
}
- const wxString prefix = wxString(wxT("[")) + wxDateTime(msg.time).FormatTime() + wxT("] ") + typeName + wxT(": ");
+ const wxString prefix = wxString(L"[") + wxDateTime(msg.time).FormatTime() + L"] " + typeName + L": ";
wxString formattedText = prefix;
- for (wxString::const_iterator i = msg.message.begin(); i != msg.message.end(); ++i)
+ for (auto i = msg.message.begin(); i != msg.message.end(); ++i)
if (*i == wxChar('\n'))
{
- formattedText += wxString(wxChar('\n')).Pad(prefix.size(), wxChar(' '), true);
- while (*++i == wxChar('\n')) //remove duplicate newlines
+ formattedText += L'\n';
+
+ wxString blanks;
+ blanks.resize(prefix.size(), L' ');
+ formattedText += blanks;
+
+ while (*++i == L'\n') //remove duplicate newlines
;
--i;
}
bgstack15