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:
@@ -1377,12 +1377,11 @@ void wxGCDCImpl::DoDrawCheckMark(wxCoord x, wxCoord y,
|
|||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
wxRect wxGCDCImpl::MSWApplyGDIPlusTransform(const wxRect& r) const
|
wxRect wxGCDCImpl::MSWApplyGDIPlusTransform(const wxRect& r) const
|
||||||
{
|
{
|
||||||
wxGraphicsContext* const gc = GetGraphicsContext();
|
wxCHECK_MSG( IsOk(), r, wxS("Invalid wxGCDC") );
|
||||||
wxCHECK_MSG( gc, r, wxT("Invalid wxGCDC") );
|
|
||||||
|
|
||||||
double x = 0,
|
double x = 0,
|
||||||
y = 0;
|
y = 0;
|
||||||
gc->GetTransform().TransformPoint(&x, &y);
|
m_graphicContext->GetTransform().TransformPoint(&x, &y);
|
||||||
|
|
||||||
wxRect rect(r);
|
wxRect rect(r);
|
||||||
rect.Offset(x, y);
|
rect.Offset(x, y);
|
||||||
|
Reference in New Issue
Block a user