From d0914b9d8d6381957395e7124d48a52fe08fb48f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 16 Apr 2006 22:29:47 +0000 Subject: [PATCH] build fixes for wxUSE_LOG==0 (modified patch 1450207) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38766 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/zipstrm.cpp | 2 +- src/msw/mediactrl.cpp | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/common/zipstrm.cpp b/src/common/zipstrm.cpp index fc5670266d..981d506d20 100644 --- a/src/common/zipstrm.cpp +++ b/src/common/zipstrm.cpp @@ -117,7 +117,7 @@ static inline wxUint32 CrackUint32(const char *m) // static wxFileOffset QuietSeek(wxInputStream& stream, wxFileOffset pos) { -#ifdef __WXDEBUG__ +#if defined(__WXDEBUG__) && wxUSE_LOG wxLogLevel level = wxLog::GetLogLevel(); wxLog::SetLogLevel(wxLOG_Debug - 1); wxFileOffset result = stream.SeekI(pos); diff --git a/src/msw/mediactrl.cpp b/src/msw/mediactrl.cpp index 4931215a5f..d99997daed 100644 --- a/src/msw/mediactrl.cpp +++ b/src/msw/mediactrl.cpp @@ -1685,7 +1685,7 @@ enum #define wxDL_METHOD_LOAD( lib, name, success ) \ pfn_ ## name = (name ## Type) lib.GetSymbol( wxT(#name), &success ); \ - if (!success) { wxLog::EnableLogging(bWasLoggingEnabled); return false; } + if (!success) return false class WXDLLIMPEXP_MEDIA wxQuickTimeLibrary @@ -1799,12 +1799,12 @@ bool wxQuickTimeLibrary::Initialize() { m_ok = false; - // Turn off the wxDynamicLibrary logging - bool bWasLoggingEnabled = wxLog::EnableLogging(false); + // Turn off the wxDynamicLibrary logging as we're prepared to handle the + // errors + wxLogNull nolog; if (!m_dll.Load(wxT("qtmlClient.dll"))) { - wxLog::EnableLogging(bWasLoggingEnabled); return false; } @@ -1864,7 +1864,6 @@ bool wxQuickTimeLibrary::Initialize() wxDL_METHOD_LOAD( m_dll, EndUpdate, m_ok ); wxDL_METHOD_LOAD( m_dll, GetMoviesStickyError, m_ok ); - wxLog::EnableLogging(bWasLoggingEnabled); m_ok = true; return true; -- 2.45.2