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
This commit is contained in:
Vadim Zeitlin
2011-07-07 13:05:16 +00:00
parent e328846969
commit 6c0e710f00
3 changed files with 4 additions and 4 deletions

View File

@@ -32,7 +32,7 @@ public:
wxGCDC(); wxGCDC();
virtual ~wxGCDC(); virtual ~wxGCDC();
wxGraphicsContext* GetGraphicsContext(); wxGraphicsContext* GetGraphicsContext() const;
void SetGraphicsContext( wxGraphicsContext* ctx ); void SetGraphicsContext( wxGraphicsContext* ctx );
#ifdef __WXMSW__ #ifdef __WXMSW__
@@ -103,7 +103,7 @@ public:
virtual void ComputeScaleAndOrigin(); virtual void ComputeScaleAndOrigin();
wxGraphicsContext* GetGraphicsContext() { return m_graphicContext; } wxGraphicsContext* GetGraphicsContext() const { return m_graphicContext; }
virtual void SetGraphicsContext( wxGraphicsContext* ctx ); virtual void SetGraphicsContext( wxGraphicsContext* ctx );
// the true implementations // the true implementations

View File

@@ -38,6 +38,6 @@ public:
/** /**
Retrieves associated wxGraphicsContext Retrieves associated wxGraphicsContext
*/ */
wxGraphicsContext* GetGraphicsContext(); wxGraphicsContext* GetGraphicsContext() const;
}; };

View File

@@ -123,7 +123,7 @@ wxGCDC::~wxGCDC()
{ {
} }
wxGraphicsContext* wxGCDC::GetGraphicsContext() wxGraphicsContext* wxGCDC::GetGraphicsContext() const
{ {
if (!m_pimpl) return NULL; if (!m_pimpl) return NULL;
wxGCDCImpl *gc_impl = (wxGCDCImpl*) m_pimpl; wxGCDCImpl *gc_impl = (wxGCDCImpl*) m_pimpl;