applied patch for compilation with gcc 3.0

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-06-06 16:51:53 +00:00
parent 014e19de74
commit dd107c50be
30 changed files with 146 additions and 127 deletions

View File

@@ -296,7 +296,7 @@ bool wxDocument::OnSaveDocument(const wxString& file)
msgTitle = wxString(_("File error"));
#if wxUSE_STD_IOSTREAM
ofstream store(wxString(file.fn_str()).mb_str());
wxSTD ofstream store(wxString(file.fn_str()).mb_str());
if (store.fail() || store.bad())
#else
wxFileOutputStream store(wxString(file.fn_str()));
@@ -332,7 +332,7 @@ bool wxDocument::OnOpenDocument(const wxString& file)
msgTitle = wxString(_("File error"));
#if wxUSE_STD_IOSTREAM
ifstream store(wxString(file.fn_str()).mb_str());
wxSTD ifstream store(wxString(file.fn_str()).mb_str());
if (store.fail() || store.bad())
#else
wxFileInputStream store(wxString(file.fn_str()));
@@ -365,7 +365,7 @@ bool wxDocument::OnOpenDocument(const wxString& file)
}
#if wxUSE_STD_IOSTREAM
istream& wxDocument::LoadObject(istream& stream)
wxSTD istream& wxDocument::LoadObject(wxSTD istream& stream)
#else
wxInputStream& wxDocument::LoadObject(wxInputStream& stream)
#endif
@@ -374,7 +374,7 @@ wxInputStream& wxDocument::LoadObject(wxInputStream& stream)
}
#if wxUSE_STD_IOSTREAM
ostream& wxDocument::SaveObject(ostream& stream)
wxSTD ostream& wxDocument::SaveObject(wxSTD ostream& stream)
#else
wxOutputStream& wxDocument::SaveObject(wxOutputStream& stream)
#endif
@@ -2314,7 +2314,7 @@ void wxFileHistory::AddFilesToMenu(wxMenu* menu)
// ----------------------------------------------------------------------------
#if wxUSE_STD_IOSTREAM
bool wxTransferFileToStream(const wxString& filename, ostream& stream)
bool wxTransferFileToStream(const wxString& filename, wxSTD ostream& stream)
{
FILE *fd1;
int ch;
@@ -2329,7 +2329,7 @@ bool wxTransferFileToStream(const wxString& filename, ostream& stream)
return TRUE;
}
bool wxTransferStreamToFile(istream& stream, const wxString& filename)
bool wxTransferStreamToFile(wxSTD istream& stream, const wxString& filename)
{
FILE *fd1;
int ch;

View File

@@ -556,10 +556,10 @@ void wxLogStderr::DoLogString(const wxChar *szString, time_t WXUNUSED(t))
// ----------------------------------------------------------------------------
#if wxUSE_STD_IOSTREAM
wxLogStream::wxLogStream(ostream *ostr)
wxLogStream::wxLogStream(wxSTD ostream *ostr)
{
if ( ostr == NULL )
m_ostr = &cerr;
m_ostr = &wxSTD cerr;
else
m_ostr = ostr;
}
@@ -568,7 +568,7 @@ void wxLogStream::DoLogString(const wxChar *szString, time_t WXUNUSED(t))
{
wxString str;
TimeStamp(&str);
(*m_ostr) << str << wxConvertWX2MB(szString) << endl;
(*m_ostr) << str << wxConvertWX2MB(szString) << wxSTD endl;
}
#endif // wxUSE_STD_IOSTREAM

View File

@@ -60,11 +60,11 @@ void *wxLongLongNative::asArray() const
#if wxUSE_STD_IOSTREAM
// input/output
ostream& operator<< (ostream& o, const wxLongLongNative& ll)
wxSTD ostream& operator<< (wxSTD ostream& o, const wxLongLongNative& ll)
{
char result[65];
memset(result, 'A', 64);
wxSTD memset(result, 'A', 64);
result[64] = '\0';
@@ -629,7 +629,7 @@ void *wxLongLongWx::asArray(void) const
#if wxUSE_STD_IOSTREAM
// input/output
ostream& operator<< (ostream& o, const wxLongLongWx& ll)
wxSTD ostream& operator<< (wxSTD ostream& o, const wxLongLongWx& ll)
{
char result[65];

View File

@@ -461,12 +461,12 @@ int wxMemStruct::ValidateNode ()
wxMemStruct *wxDebugContext::m_head = NULL;
wxMemStruct *wxDebugContext::m_tail = NULL;
// ostream *wxDebugContext::m_debugStream = NULL;
// streambuf *wxDebugContext::m_streamBuf = NULL;
// wxSTD ostream *wxDebugContext::m_debugStream = NULL;
// wxSTD streambuf *wxDebugContext::m_streamBuf = NULL;
// Must initialise these in wxEntry, and then delete them just before wxEntry exits
streambuf *wxDebugContext::m_streamBuf = NULL;
ostream *wxDebugContext::m_debugStream = NULL;
wxSTD streambuf *wxDebugContext::m_streamBuf = NULL;
wxSTD ostream *wxDebugContext::m_debugStream = NULL;
bool wxDebugContext::m_checkPrevious = FALSE;
int wxDebugContext::debugLevel = 1;
@@ -481,7 +481,7 @@ int wxDebugContext::m_balignmask = (int)((char *)&markerCalc[1] - (char*)&marker
wxDebugContext::wxDebugContext(void)
{
// m_streamBuf = new wxDebugStreamBuf;
// m_debugStream = new ostream(m_streamBuf);
// m_debugStream = new wxSTD ostream(m_streamBuf);
}
wxDebugContext::~wxDebugContext(void)
@@ -494,7 +494,7 @@ wxDebugContext::~wxDebugContext(void)
* between SetFile and SetStream.
*/
void wxDebugContext::SetStream(ostream *str, streambuf *buf)
void wxDebugContext::SetStream(wxSTD ostream *str, streambuf *buf)
{
if (m_debugStream)
{
@@ -519,7 +519,7 @@ void wxDebugContext::SetStream(ostream *str, streambuf *buf)
bool wxDebugContext::SetFile(const wxString& file)
{
ofstream *str = new ofstream(file.mb_str());
wxSTD ofstream *str = new wxSTD ofstream(file.mb_str());
if (str->bad())
{
@@ -539,7 +539,7 @@ bool wxDebugContext::SetStandardError(void)
#if 0
#if !defined(_WINDLL)
wxDebugStreamBuf *buf = new wxDebugStreamBuf;
ostream *stream = new ostream(m_streamBuf);
wxSTD ostream *stream = new wxSTD ostream(m_streamBuf);
SetStream(stream, buf);
return TRUE;
#else

View File

@@ -116,7 +116,7 @@ void wxObject::CopyObject(wxObject& WXUNUSED(object_dest)) const
}
#if wxUSE_STD_IOSTREAM && (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT)
void wxObject::Dump(ostream& str)
void wxObject::Dump(wxSTD ostream& str)
{
if (GetClassInfo() && GetClassInfo()->GetClassName())
str << GetClassInfo()->GetClassName();

View File

@@ -153,7 +153,7 @@ extern const wxChar WXDLLEXPORT *wxEmptyString = &g_strEmpty.dummy;
//
// ATTN: you can _not_ use both of these in the same program!
istream& operator>>(istream& is, wxString& WXUNUSED(str))
wxSTD istream& operator>>(wxSTD istream& is, wxString& WXUNUSED(str))
{
#if 0
int w = is.width(0);
@@ -184,7 +184,7 @@ istream& operator>>(istream& is, wxString& WXUNUSED(str))
return is;
}
ostream& operator<<(ostream& os, const wxString& str)
wxSTD ostream& operator<<(wxSTD ostream& os, const wxString& str)
{
os << str.c_str();
return os;

View File

@@ -69,11 +69,11 @@ public:
virtual void Copy(wxVariantData& data);
virtual bool Eq(wxVariantData& data) const;
#if wxUSE_STD_IOSTREAM
virtual bool Write(ostream& str) const;
virtual bool Write(wxSTD ostream& str) const;
#endif
virtual bool Write(wxString& str) const;
#if wxUSE_STD_IOSTREAM
virtual bool Read(istream& str);
virtual bool Read(wxSTD istream& str);
#endif
virtual bool Read(wxString& str);
virtual wxString GetType() const { return wxT("list"); };
@@ -157,7 +157,7 @@ bool wxVariantDataList::Eq(wxVariantData& data) const
}
#if wxUSE_STD_IOSTREAM
bool wxVariantDataList::Write(ostream& str) const
bool wxVariantDataList::Write(wxSTD ostream& str) const
{
wxString s;
Write(s);
@@ -184,7 +184,7 @@ bool wxVariantDataList::Write(wxString& str) const
}
#if wxUSE_STD_IOSTREAM
bool wxVariantDataList::Read(istream& WXUNUSED(str))
bool wxVariantDataList::Read(wxSTD istream& WXUNUSED(str))
{
wxFAIL_MSG(wxT("Unimplemented"));
// TODO
@@ -216,11 +216,11 @@ public:
virtual void Copy(wxVariantData& data);
virtual bool Eq(wxVariantData& data) const;
#if wxUSE_STD_IOSTREAM
virtual bool Write(ostream& str) const;
virtual bool Write(wxSTD ostream& str) const;
#endif
virtual bool Write(wxString& str) const;
#if wxUSE_STD_IOSTREAM
virtual bool Read(istream& str);
virtual bool Read(wxSTD istream& str);
#endif
virtual bool Read(wxString& str);
virtual wxString GetType() const { return wxT("stringlist"); };
@@ -266,7 +266,7 @@ bool wxVariantDataStringList::Eq(wxVariantData& data) const
}
#if wxUSE_STD_IOSTREAM
bool wxVariantDataStringList::Write(ostream& str) const
bool wxVariantDataStringList::Write(wxSTD ostream& str) const
{
wxString s;
Write(s);
@@ -292,7 +292,7 @@ bool wxVariantDataStringList::Write(wxString& str) const
}
#if wxUSE_STD_IOSTREAM
bool wxVariantDataStringList::Read(istream& WXUNUSED(str))
bool wxVariantDataStringList::Read(wxSTD istream& WXUNUSED(str))
{
wxFAIL_MSG(wxT("Unimplemented"));
// TODO
@@ -327,8 +327,8 @@ public:
virtual bool Read(wxString& str);
virtual bool Write(wxString& str) const;
#if wxUSE_STD_IOSTREAM
virtual bool Read(istream& str);
virtual bool Write(ostream& str) const;
virtual bool Read(wxSTD istream& str);
virtual bool Write(wxSTD ostream& str) const;
#endif
#if wxUSE_STREAMS
virtual bool Read(wxInputStream& str);
@@ -362,7 +362,7 @@ bool wxVariantDataLong::Eq(wxVariantData& data) const
}
#if wxUSE_STD_IOSTREAM
bool wxVariantDataLong::Write(ostream& str) const
bool wxVariantDataLong::Write(wxSTD ostream& str) const
{
wxString s;
Write(s);
@@ -378,7 +378,7 @@ bool wxVariantDataLong::Write(wxString& str) const
}
#if wxUSE_STD_IOSTREAM
bool wxVariantDataLong::Read(istream& str)
bool wxVariantDataLong::Read(wxSTD istream& str)
{
str >> m_value;
return TRUE;
@@ -426,11 +426,11 @@ public:
virtual bool Eq(wxVariantData& data) const;
virtual bool Read(wxString& str);
#if wxUSE_STD_IOSTREAM
virtual bool Write(ostream& str) const;
virtual bool Write(wxSTD ostream& str) const;
#endif
virtual bool Write(wxString& str) const;
#if wxUSE_STD_IOSTREAM
virtual bool Read(istream& str);
virtual bool Read(wxSTD istream& str);
#endif
#if wxUSE_STREAMS
virtual bool Read(wxInputStream& str);
@@ -463,7 +463,7 @@ bool wxVariantDataReal::Eq(wxVariantData& data) const
}
#if wxUSE_STD_IOSTREAM
bool wxVariantDataReal::Write(ostream& str) const
bool wxVariantDataReal::Write(wxSTD ostream& str) const
{
wxString s;
Write(s);
@@ -479,7 +479,7 @@ bool wxVariantDataReal::Write(wxString& str) const
}
#if wxUSE_STD_IOSTREAM
bool wxVariantDataReal::Read(istream& str)
bool wxVariantDataReal::Read(wxSTD istream& str)
{
str >> m_value;
return TRUE;
@@ -526,12 +526,12 @@ public:
virtual void Copy(wxVariantData& data);
virtual bool Eq(wxVariantData& data) const;
#if wxUSE_STD_IOSTREAM
virtual bool Write(ostream& str) const;
virtual bool Write(wxSTD ostream& str) const;
#endif
virtual bool Write(wxString& str) const;
virtual bool Read(wxString& str);
#if wxUSE_STD_IOSTREAM
virtual bool Read(istream& str);
virtual bool Read(wxSTD istream& str);
#endif
#if wxUSE_STREAMS
virtual bool Read(wxInputStream& str);
@@ -564,7 +564,7 @@ bool wxVariantDataBool::Eq(wxVariantData& data) const
}
#if wxUSE_STD_IOSTREAM
bool wxVariantDataBool::Write(ostream& str) const
bool wxVariantDataBool::Write(wxSTD ostream& str) const
{
wxString s;
Write(s);
@@ -580,7 +580,7 @@ bool wxVariantDataBool::Write(wxString& str) const
}
#if wxUSE_STD_IOSTREAM
bool wxVariantDataBool::Read(istream& WXUNUSED(str))
bool wxVariantDataBool::Read(wxSTD istream& WXUNUSED(str))
{
wxFAIL_MSG(wxT("Unimplemented"));
// str >> (long) m_value;
@@ -630,8 +630,8 @@ public:
virtual void Copy(wxVariantData& data);
virtual bool Eq(wxVariantData& data) const;
#if wxUSE_STD_IOSTREAM
virtual bool Read(istream& str);
virtual bool Write(ostream& str) const;
virtual bool Read(wxSTD istream& str);
virtual bool Write(wxSTD ostream& str) const;
#endif
virtual bool Read(wxString& str);
virtual bool Write(wxString& str) const;
@@ -666,7 +666,7 @@ bool wxVariantDataChar::Eq(wxVariantData& data) const
}
#if wxUSE_STD_IOSTREAM
bool wxVariantDataChar::Write(ostream& str) const
bool wxVariantDataChar::Write(wxSTD ostream& str) const
{
wxString s;
Write(s);
@@ -682,7 +682,7 @@ bool wxVariantDataChar::Write(wxString& str) const
}
#if wxUSE_STD_IOSTREAM
bool wxVariantDataChar::Read(istream& WXUNUSED(str))
bool wxVariantDataChar::Read(wxSTD istream& WXUNUSED(str))
{
wxFAIL_MSG(wxT("Unimplemented"));
// str >> m_value;
@@ -740,12 +740,12 @@ public:
virtual void Copy(wxVariantData& data);
virtual bool Eq(wxVariantData& data) const;
#if wxUSE_STD_IOSTREAM
virtual bool Write(ostream& str) const;
virtual bool Write(wxSTD ostream& str) const;
#endif
virtual bool Read(wxString& str);
virtual bool Write(wxString& str) const;
#if wxUSE_STD_IOSTREAM
virtual bool Read(istream& str);
virtual bool Read(wxSTD istream& str);
#endif
#if wxUSE_STREAMS
virtual bool Read(wxInputStream& str);
@@ -776,7 +776,7 @@ bool wxVariantDataString::Eq(wxVariantData& data) const
}
#if wxUSE_STD_IOSTREAM
bool wxVariantDataString::Write(ostream& str) const
bool wxVariantDataString::Write(wxSTD ostream& str) const
{
str << (const char*) m_value.mb_str();
return TRUE;
@@ -790,7 +790,7 @@ bool wxVariantDataString::Write(wxString& str) const
}
#if wxUSE_STD_IOSTREAM
bool wxVariantDataString::Read(istream& str)
bool wxVariantDataString::Read(wxSTD istream& str)
{
str >> m_value;
return TRUE;
@@ -847,11 +847,11 @@ public:
virtual void Copy(wxVariantData& data);
virtual bool Eq(wxVariantData& data) const;
#if wxUSE_STD_IOSTREAM
virtual bool Write(ostream& str) const;
virtual bool Write(wxSTD ostream& str) const;
#endif
virtual bool Write(wxString& str) const;
#if wxUSE_STD_IOSTREAM
virtual bool Read(istream& str);
virtual bool Read(wxSTD istream& str);
#endif
virtual bool Read(wxString& str);
virtual wxString GetType() const { return wxT("time"); };
@@ -882,7 +882,7 @@ bool wxVariantDataTime::Eq(wxVariantData& data) const
}
#if wxUSE_STD_IOSTREAM
bool wxVariantDataTime::Write(ostream& str) const
bool wxVariantDataTime::Write(wxSTD ostream& str) const
{
wxString s;
Write(s);
@@ -899,7 +899,7 @@ bool wxVariantDataTime::Write(wxString& str) const
}
#if wxUSE_STD_IOSTREAM
bool wxVariantDataTime::Read(istream& WXUNUSED(str))
bool wxVariantDataTime::Read(wxSTD istream& WXUNUSED(str))
{
// Not implemented
return FALSE;
@@ -929,11 +929,11 @@ public:
virtual void Copy(wxVariantData& data);
virtual bool Eq(wxVariantData& data) const;
#if wxUSE_STD_IOSTREAM
virtual bool Write(ostream& str) const;
virtual bool Write(wxSTD ostream& str) const;
#endif
virtual bool Write(wxString& str) const;
#if wxUSE_STD_IOSTREAM
virtual bool Read(istream& str);
virtual bool Read(wxSTD istream& str);
#endif
virtual bool Read(wxString& str);
virtual wxString GetType() const { return wxT("date"); };
@@ -964,7 +964,7 @@ bool wxVariantDataDate::Eq(wxVariantData& data) const
}
#if wxUSE_STD_IOSTREAM
bool wxVariantDataDate::Write(ostream& str) const
bool wxVariantDataDate::Write(wxSTD ostream& str) const
{
wxString s;
Write(s);
@@ -980,7 +980,7 @@ bool wxVariantDataDate::Write(wxString& str) const
}
#if wxUSE_STD_IOSTREAM
bool wxVariantDataDate::Read(istream& WXUNUSED(str))
bool wxVariantDataDate::Read(wxSTD istream& WXUNUSED(str))
{
// Not implemented
return FALSE;
@@ -1012,11 +1012,11 @@ public:
virtual void Copy(wxVariantData& data);
virtual bool Eq(wxVariantData& data) const;
#if wxUSE_STD_IOSTREAM
virtual bool Write(ostream& str) const;
virtual bool Write(wxSTD ostream& str) const;
#endif
virtual bool Write(wxString& str) const;
#if wxUSE_STD_IOSTREAM
virtual bool Read(istream& str);
virtual bool Read(wxSTD istream& str);
#endif
virtual bool Read(wxString& str);
virtual wxString GetType() const { return wxT("void*"); };
@@ -1047,7 +1047,7 @@ bool wxVariantDataVoidPtr::Eq(wxVariantData& data) const
}
#if wxUSE_STD_IOSTREAM
bool wxVariantDataVoidPtr::Write(ostream& str) const
bool wxVariantDataVoidPtr::Write(wxSTD ostream& str) const
{
wxString s;
Write(s);
@@ -1063,7 +1063,7 @@ bool wxVariantDataVoidPtr::Write(wxString& str) const
}
#if wxUSE_STD_IOSTREAM
bool wxVariantDataVoidPtr::Read(istream& WXUNUSED(str))
bool wxVariantDataVoidPtr::Read(wxSTD istream& WXUNUSED(str))
{
// Not implemented
return FALSE;