X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/33ac7e6f01acbac1cff0ad400d8ea7f0bfd0a62f..20ea6894a2660c453c3255a66aa9f7e24cf97ec8:/src/common/memory.cpp diff --git a/src/common/memory.cpp b/src/common/memory.cpp index 2f97c44bd0..5302fe214d 100644 --- a/src/common/memory.cpp +++ b/src/common/memory.cpp @@ -40,11 +40,14 @@ #include "wx/ioswrap.h" +// Obsolete +#if 0 #if wxUSE_IOSTREAMH #include #else #include #endif +#endif #if !defined(__WATCOMC__) && !(defined(__VMS__) && ( __VMS_VER < 70000000 ) )\ && !defined( __MWERKS__ ) && !defined(__SALFORDC__) @@ -461,12 +464,15 @@ 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; +// Obsolete +#if 0 +wxSTD streambuf *wxDebugContext::m_streamBuf = NULL; +wxSTD ostream *wxDebugContext::m_debugStream = NULL; +#endif bool wxDebugContext::m_checkPrevious = FALSE; int wxDebugContext::debugLevel = 1; @@ -481,12 +487,12 @@ 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) { - SetStream(NULL, NULL); +// SetStream(NULL, NULL); } /* @@ -494,7 +500,9 @@ wxDebugContext::~wxDebugContext(void) * between SetFile and SetStream. */ -void wxDebugContext::SetStream(ostream *str, streambuf *buf) +// Obsolete +#if 0 +void wxDebugContext::SetStream(wxSTD ostream *str, wxSTD streambuf *buf) { if (m_debugStream) { @@ -508,7 +516,7 @@ void wxDebugContext::SetStream(ostream *str, streambuf *buf) #ifndef __WATCOMC__ if (m_streamBuf) { - streambuf* oldBuf = m_streamBuf; + wxSTD streambuf* oldBuf = m_streamBuf; m_streamBuf = NULL; delete oldBuf; } @@ -519,7 +527,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 +547,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 @@ -548,7 +556,8 @@ bool wxDebugContext::SetStandardError(void) #endif return FALSE; } - +#endif + // 0 /* Work out the positions of the markers by creating an array of 2 markers @@ -615,13 +624,13 @@ size_t wxDebugContext::PaddedSize (const size_t size) { // Added by Terry Farnham to replace // slow GetPadding call. - int padb; + int padb; - padb = size & m_balignmask; - if(padb) - return(size + m_balign - padb); - else - return(size); + padb = size & m_balignmask; + if(padb) + return(size + m_balign - padb); + else + return(size); // Old (slow) code #if 0 @@ -687,7 +696,7 @@ bool wxDebugContext::Dump(void) // if (TRUE) { - wxChar* appName = wxT("application"); + wxChar* appName = (wxChar*) wxT("application"); wxString appNameStr(""); if (wxTheApp) { @@ -746,7 +755,7 @@ bool wxDebugContext::PrintStatistics(bool detailed) // if (TRUE) { - wxChar* appName = wxT("application"); + wxChar* appName = (wxChar*) wxT("application"); wxString appNameStr(wxT("")); if (wxTheApp) { @@ -780,7 +789,7 @@ bool wxDebugContext::PrintStatistics(bool detailed) // if (detailed && (data != (void*)m_debugStream) && (data != (void*) m_streamBuf)) if (detailed && (data != (void*) wxLog::GetActiveTarget())) { - wxChar *className = wxT("nonobject"); + wxChar *className = (wxChar*) wxT("nonobject"); if (st->m_isObject && st->GetActualData()) { wxObject *obj = (wxObject *)st->GetActualData(); @@ -846,7 +855,7 @@ bool wxDebugContext::PrintClasses(void) // if (TRUE) { - wxChar* appName = wxT("application"); + wxChar* appName = (wxChar*) wxT("application"); wxString appNameStr(wxT("")); if (wxTheApp) {