From 6c0e710f008370d8c0039b3aa859b8eb65d6de12 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 7 Jul 2011 13:05:16 +0000 Subject: [PATCH] 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 --- include/wx/dcgraph.h | 4 ++-- interface/wx/dcgraph.h | 2 +- src/common/dcgraph.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) 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; -- 2.50.0