From: Vadim Zeitlin Date: Thu, 22 Apr 2010 14:16:22 +0000 (+0000) Subject: Don't test possibly uninitialized variable in wxGCDC::SetLogicalFunction(). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/584be856d1ad6da9f2f6855e2185fe9773f9df19 Don't test possibly uninitialized variable in wxGCDC::SetLogicalFunction(). The variable "mode" is not filled by TranslateRasterOp() function if the input function is not supported, so don't compare it with wxCOMPOSITION_XOR later. Just compare "function" itself with wxXOR as this works in any case. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64111 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp index b58590edc3..66a531bb47 100644 --- a/src/common/dcgraph.cpp +++ b/src/common/dcgraph.cpp @@ -505,7 +505,7 @@ void wxGCDCImpl::SetLogicalFunction( wxRasterOperationMode function ) if (m_logicalFunctionSupported) m_logicalFunctionSupported = m_graphicContext->SetCompositionMode(mode); - if (mode == wxCOMPOSITION_XOR) + if ( function == wxXOR ) m_graphicContext->SetAntialiasMode(wxANTIALIAS_NONE); else m_graphicContext->SetAntialiasMode(wxANTIALIAS_DEFAULT);