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:
@@ -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
|
||||||
|
@@ -38,6 +38,6 @@ public:
|
|||||||
/**
|
/**
|
||||||
Retrieves associated wxGraphicsContext
|
Retrieves associated wxGraphicsContext
|
||||||
*/
|
*/
|
||||||
wxGraphicsContext* GetGraphicsContext();
|
wxGraphicsContext* GetGraphicsContext() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -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;
|
||||||
|
Reference in New Issue
Block a user