From 0f358732e44d89af3d83c4b77e19d0963afa7c7e Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 11 Nov 1998 09:53:54 +0000 Subject: [PATCH] Changed setup.h so that global memory operators are switched off for GnuWin32; rearranged wxWave constructors; small changes in tlog.tex git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/tlog.tex | 4 ++-- include/wx/msw/setup.h | 10 ++++++++-- src/common/memory.cpp | 1 + src/msw/wave.cpp | 6 +++--- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/docs/latex/wx/tlog.tex b/docs/latex/wx/tlog.tex index 3cb6ecb439..ae08edef53 100644 --- a/docs/latex/wx/tlog.tex +++ b/docs/latex/wx/tlog.tex @@ -34,7 +34,7 @@ informational messages preceding them meaningless. \item{\bf wxLogVerbose} is for verbose output. Normally, it's suppressed, but might be activated if the user wishes to know more details about the program progress (another, but possibly confusing name for the same function is {\bf -wxLogInfo} +wxLogInfo}). \item{\bf wxLogStatus} is for status messages - they will go into the status bar of the active or specified (as the first argument) \helpref{wxFrame}{wxframe} if it has one. \item{\bf wxLogSysError} is mostly used by wxWindows itself, but might be @@ -64,7 +64,7 @@ classes are. Some of advantages in using wxWindows log functions are: \begin{itemize}\itemsep=0pt \item{\bf Portability} It's a common practice to use {\it printf()} statements or cout/cerr C++ streams for writing out some (debug or otherwise) information. -Although it works just fine under Unix, these messages go strictly nowever +Although it works just fine under Unix, these messages go strictly nowhere under Windows where the stdout of GUI programs is not assigned to anything. Thus, you might view {\it wxLogMessage()} as a simple substitute for {\it printf()}. diff --git a/include/wx/msw/setup.h b/include/wx/msw/setup.h index 82bc3a3c03..ad0df4d227 100644 --- a/include/wx/msw/setup.h +++ b/include/wx/msw/setup.h @@ -116,13 +116,13 @@ // NOW MANDATORY: don't change. #define wxUSE_MEMORY_TRACING 1 // If 1, enables debugging versions of wxObject::new and - // wxObject::delete *IF* WXDEBUG is also defined. + // wxObject::delete *IF* __WXDEBUG__ is also defined. // WARNING: this code may not work with all architectures, especially // if alignment is an issue. #define wxUSE_DEBUG_CONTEXT 1 // If 1, enables wxDebugContext, for // writing error messages to file, etc. - // If WXDEBUG is not defined, will still use + // If __WXDEBUG__ is not defined, will still use // normal memory operators. // It's recommended to set this to 1, // since you may well need to output @@ -132,6 +132,12 @@ // In debug mode, cause new and delete to be redefined globally. // If this causes problems (e.g. link errors), set this to 0. +// GnuWin32 (b19) can't copy with these operators. +#ifdef __GNUWIN32__ +#undef wxUSE_GLOBAL_MEMORY_OPERATORS 1 +#define wxUSE_GLOBAL_MEMORY_OPERATORS 0 +#endif + #define REMOVE_UNUSED_ARG 1 // Set this to 0 if your compiler can't cope // with omission of prototype parameters. diff --git a/src/common/memory.cpp b/src/common/memory.cpp index 785bcde816..1b89cd78be 100644 --- a/src/common/memory.cpp +++ b/src/common/memory.cpp @@ -953,6 +953,7 @@ void operator delete(void* pData, char* /* fileName */, int /* lineNum */) #endif #if !( defined (_MSC_VER) && (_MSC_VER <= 1020) ) + void operator delete[] (void * buf) { #ifdef NO_DEBUG_ALLOCATION diff --git a/src/msw/wave.cpp b/src/msw/wave.cpp index 1f3ba0dd82..23f09f7c47 100644 --- a/src/msw/wave.cpp +++ b/src/msw/wave.cpp @@ -40,18 +40,18 @@ #endif wxWave::wxWave() - : m_waveLength(0), m_isResource(FALSE), m_waveData(NULL) + : m_waveData(NULL), m_waveLength(0), m_isResource(FALSE) { } wxWave::wxWave(const wxString& sFileName, bool isResource) - : m_waveLength(0), m_isResource(isResource), m_waveData(NULL) + : m_waveData(NULL), m_waveLength(0), m_isResource(isResource) { Create(sFileName, isResource); } wxWave::wxWave(int size, const byte* data) - : m_waveLength(0), m_isResource(FALSE), m_waveData(NULL) + : m_waveData(NULL), m_waveLength(0), m_isResource(FALSE) { Create(size, data); } -- 2.45.2