Avoid uninitialized variable warnings in debug MSVC build
The compiler is smart enough to determine that the variables are always initialized when they're actually used when using optimizations, but gives a bunch of C4701 warnings for them if we don't initialize them in the non-optimized debug builds.
This commit is contained in:
@@ -1234,7 +1234,10 @@ void wxGCDCImpl::DoGetTextExtent( const wxString &str, wxCoord *width, wxCoord *
|
|||||||
m_graphicContext->SetFont( *theFont, m_textForegroundColour );
|
m_graphicContext->SetFont( *theFont, m_textForegroundColour );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxDouble h , d , e , w;
|
wxDouble w wxDUMMY_INITIALIZE(0),
|
||||||
|
h wxDUMMY_INITIALIZE(0),
|
||||||
|
d wxDUMMY_INITIALIZE(0),
|
||||||
|
e wxDUMMY_INITIALIZE(0);
|
||||||
|
|
||||||
// Don't pass non-NULL pointers for the parts we don't need, this could
|
// Don't pass non-NULL pointers for the parts we don't need, this could
|
||||||
// result in doing extra unnecessary work inside GetTextExtent().
|
// result in doing extra unnecessary work inside GetTextExtent().
|
||||||
|
Reference in New Issue
Block a user