Always initialize values returned from wxGDDC::GetChar{Width,Height}().

Don't return garbage in case of error.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-02-22 22:40:03 +00:00
parent 25a03f93a5
commit 332952a18c

View File

@@ -1066,7 +1066,7 @@ bool wxGCDCImpl::DoGetPartialTextExtents(const wxString& text, wxArrayInt& width
wxCoord wxGCDCImpl::GetCharWidth(void) const
{
wxCoord width;
wxCoord width = 0;
DoGetTextExtent( wxT("g") , &width , NULL , NULL , NULL , NULL );
return width;
@@ -1074,7 +1074,7 @@ wxCoord wxGCDCImpl::GetCharWidth(void) const
wxCoord wxGCDCImpl::GetCharHeight(void) const
{
wxCoord height;
wxCoord height = 0;
DoGetTextExtent( wxT("g") , NULL , &height , NULL , NULL , NULL );
return height;