attemps to make wxStreamToTextRedirector work with more (broken) compilers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
0bc9347069
commit
9806a823b0
@ -435,14 +435,26 @@ typedef void (wxEvtHandler::*wxTextUrlEventFunction)(wxTextUrlEvent&);
|
|||||||
|
|
||||||
class WXDLLEXPORT wxStreamToTextRedirector
|
class WXDLLEXPORT wxStreamToTextRedirector
|
||||||
{
|
{
|
||||||
public:
|
private:
|
||||||
wxStreamToTextRedirector(wxTextCtrl *text, wxSTD ostream *ostr = NULL)
|
void Init()
|
||||||
: m_ostr(ostr ? *ostr : wxSTD cout)
|
|
||||||
{
|
{
|
||||||
m_sbufOld = m_ostr.rdbuf();
|
m_sbufOld = m_ostr.rdbuf();
|
||||||
m_ostr.rdbuf(text);
|
m_ostr.rdbuf(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
wxStreamToTextRedirector(wxTextCtrl *text)
|
||||||
|
: m_ostr(wxSTD cout)
|
||||||
|
{
|
||||||
|
Init();
|
||||||
|
}
|
||||||
|
|
||||||
|
wxStreamToTextRedirector(wxTextCtrl *text, wxSTD ostream *ostr)
|
||||||
|
: m_ostr(*ostr)
|
||||||
|
{
|
||||||
|
Init();
|
||||||
|
}
|
||||||
|
|
||||||
~wxStreamToTextRedirector()
|
~wxStreamToTextRedirector()
|
||||||
{
|
{
|
||||||
m_ostr.rdbuf(m_sbufOld);
|
m_ostr.rdbuf(m_sbufOld);
|
||||||
|
Loading…
Reference in New Issue
Block a user