]> git.saurik.com Git - wxWidgets.git/commitdiff
build fixes for wxUSE_LOG==0 (modified patch 1450207)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 16 Apr 2006 22:29:47 +0000 (22:29 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 16 Apr 2006 22:29:47 +0000 (22:29 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38766 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/zipstrm.cpp
src/msw/mediactrl.cpp

index fc5670266d56e49b97f1b1abb3d3dacc50218ca9..981d506d2023d36f2b0c105f331aad4ff51b1239 100644 (file)
@@ -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);
index 4931215a5f1c8d57443aff88ebcc481705c7c50f..d99997daed6cb1cdd0faa40d640043e894633445 100644 (file)
@@ -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;