Don't use local variable to store value which is already stored in the member variable.

Use pointer to wxGraphicsContext stored in the member variable instead of using additional local variable.
This commit is contained in:
Artur Wieczorek 2016-09-20 21:23:06 +02:00
parent b5a740a85f
commit ebfda5e5be

View File

@ -1377,12 +1377,11 @@ void wxGCDCImpl::DoDrawCheckMark(wxCoord x, wxCoord y,
#ifdef __WXMSW__
wxRect wxGCDCImpl::MSWApplyGDIPlusTransform(const wxRect& r) const
{
wxGraphicsContext* const gc = GetGraphicsContext();
wxCHECK_MSG( gc, r, wxT("Invalid wxGCDC") );
wxCHECK_MSG( IsOk(), r, wxS("Invalid wxGCDC") );
double x = 0,
y = 0;
gc->GetTransform().TransformPoint(&x, &y);
m_graphicContext->GetTransform().TransformPoint(&x, &y);
wxRect rect(r);
rect.Offset(x, y);