]> git.saurik.com Git - wxWidgets.git/commitdiff
Make wxGCDC::GetGraphicsContext() const.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 7 Jul 2011 13:05:16 +0000 (13:05 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 7 Jul 2011 13:05:16 +0000 (13:05 +0000)
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
interface/wx/dcgraph.h
src/common/dcgraph.cpp

index df10beeb96a039e04771e809abe42051b9121375..b002a0408a1a79aa1fd98ad56076256aa6d66432 100644 (file)
@@ -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
index 345d015acf4acd7a0410e3b7b730e788d46950ec..acd5b58b2df02ec45cac708bb28df742f80bb292 100644 (file)
@@ -38,6 +38,6 @@ public:
     /**
        Retrieves associated wxGraphicsContext
     */
-    wxGraphicsContext* GetGraphicsContext();
+    wxGraphicsContext* GetGraphicsContext() const;
 };
 
index 8cf95f3f9b3e76ec65d2fe4d9ef8d5dec6c8f61c..ab615e482fe02cbdab5af9fefbd6950bed53310d 100644 (file)
@@ -123,7 +123,7 @@ wxGCDC::~wxGCDC()
 {
 }
 
-wxGraphicsContext* wxGCDC::GetGraphicsContext()
+wxGraphicsContext* wxGCDC::GetGraphicsContext() const
 {
     if (!m_pimpl) return NULL;
     wxGCDCImpl *gc_impl = (wxGCDCImpl*) m_pimpl;