From: Vadim Zeitlin Date: Thu, 7 Jul 2011 13:05:16 +0000 (+0000) Subject: Make wxGCDC::GetGraphicsContext() const. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/6c0e710f008370d8c0039b3aa859b8eb65d6de12 Make wxGCDC::GetGraphicsContext() const. There is no reason for this accessor to not be const and it prevents other methods using it from being const too, so change this. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68179 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/dcgraph.h b/include/wx/dcgraph.h index df10beeb96..b002a0408a 100644 --- a/include/wx/dcgraph.h +++ b/include/wx/dcgraph.h @@ -32,7 +32,7 @@ public: wxGCDC(); virtual ~wxGCDC(); - wxGraphicsContext* GetGraphicsContext(); + wxGraphicsContext* GetGraphicsContext() const; void SetGraphicsContext( wxGraphicsContext* ctx ); #ifdef __WXMSW__ @@ -103,7 +103,7 @@ public: virtual void ComputeScaleAndOrigin(); - wxGraphicsContext* GetGraphicsContext() { return m_graphicContext; } + wxGraphicsContext* GetGraphicsContext() const { return m_graphicContext; } virtual void SetGraphicsContext( wxGraphicsContext* ctx ); // the true implementations diff --git a/interface/wx/dcgraph.h b/interface/wx/dcgraph.h index 345d015acf..acd5b58b2d 100644 --- a/interface/wx/dcgraph.h +++ b/interface/wx/dcgraph.h @@ -38,6 +38,6 @@ public: /** Retrieves associated wxGraphicsContext */ - wxGraphicsContext* GetGraphicsContext(); + wxGraphicsContext* GetGraphicsContext() const; }; diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp index 8cf95f3f9b..ab615e482f 100644 --- a/src/common/dcgraph.cpp +++ b/src/common/dcgraph.cpp @@ -123,7 +123,7 @@ wxGCDC::~wxGCDC() { } -wxGraphicsContext* wxGCDC::GetGraphicsContext() +wxGraphicsContext* wxGCDC::GetGraphicsContext() const { if (!m_pimpl) return NULL; wxGCDCImpl *gc_impl = (wxGCDCImpl*) m_pimpl;