From ebfda5e5bed887df325c321c792bb29d6dbb1125 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Tue, 20 Sep 2016 21:23:06 +0200 Subject: [PATCH] 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. --- src/common/dcgraph.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp index 308c9765cf..b20e449eb8 100644 --- a/src/common/dcgraph.cpp +++ b/src/common/dcgraph.cpp @@ -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);