mirror of https://github.com/odrling/Aegisub
Use std::string on osx/unix as well as osx doesn't have strndup.
Originally committed to SVN as r4735.
This commit is contained in:
parent
0b4092b602
commit
9f1b1f1cad
|
@ -40,13 +40,14 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#ifndef AGI_PRE
|
#ifndef AGI_PRE
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#include <wx/button.h>
|
#include <wx/button.h>
|
||||||
#include <wx/panel.h>
|
#include <wx/panel.h>
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
#include <wx/statline.h>
|
#include <wx/statline.h>
|
||||||
#include <wx/stattext.h>
|
#include <wx/stattext.h>
|
||||||
#endif
|
#endif
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "dialog_log.h"
|
#include "dialog_log.h"
|
||||||
|
@ -109,7 +110,7 @@ void LogWindow::EmitLog::Write(agi::log::SinkMessage *sm) {
|
||||||
sm->file,
|
sm->file,
|
||||||
sm->func,
|
sm->func,
|
||||||
sm->line,
|
sm->line,
|
||||||
strndup(sm->message, sm->len));
|
std::string(sm->message, sm->len));
|
||||||
#else
|
#else
|
||||||
wxString log = wxString::Format("%c %-6ld <%-25s> [%s:%s:%d] %s\n",
|
wxString log = wxString::Format("%c %-6ld <%-25s> [%s:%s:%d] %s\n",
|
||||||
agi::log::Severity_ID[sm->severity],
|
agi::log::Severity_ID[sm->severity],
|
||||||
|
|
Loading…
Reference in New Issue