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
This commit is contained in:
Vadim Zeitlin
2010-04-22 14:16:22 +00:00
parent a34ce03d63
commit 584be856d1

View File

@@ -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);