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:
Vadim Zeitlin 2003-09-19 22:17:38 +00:00
parent 0bc9347069
commit 9806a823b0

View File

@ -435,14 +435,26 @@ typedef void (wxEvtHandler::*wxTextUrlEventFunction)(wxTextUrlEvent&);
class WXDLLEXPORT wxStreamToTextRedirector
{
public:
wxStreamToTextRedirector(wxTextCtrl *text, wxSTD ostream *ostr = NULL)
: m_ostr(ostr ? *ostr : wxSTD cout)
private:
void Init()
{
m_sbufOld = m_ostr.rdbuf();
m_ostr.rdbuf(text);
}
public:
wxStreamToTextRedirector(wxTextCtrl *text)
: m_ostr(wxSTD cout)
{
Init();
}
wxStreamToTextRedirector(wxTextCtrl *text, wxSTD ostream *ostr)
: m_ostr(*ostr)
{
Init();
}
~wxStreamToTextRedirector()
{
m_ostr.rdbuf(m_sbufOld);