From 7a875962c50e21c6403bdeecc549faca72a3bea1 Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 8 Jul 2014 13:08:02 +1000 Subject: Specifying some methods as const as they are used from display and measurement code that will be changed to have read-only access. --- gtk/ScintillaGTK.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gtk') diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index f74971b1b..fe3547fe2 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -192,7 +192,7 @@ private: virtual bool HaveMouseCapture(); virtual bool PaintContains(PRectangle rc); void FullPaint(); - virtual PRectangle GetClientRectangle(); + virtual PRectangle GetClientRectangle() const; virtual void ScrollText(int linesToMove); virtual void SetVerticalScrollPos(); virtual void SetHorizontalScrollPos(); @@ -1121,8 +1121,9 @@ void ScintillaGTK::FullPaint() { wText.InvalidateAll(); } -PRectangle ScintillaGTK::GetClientRectangle() { - PRectangle rc = wMain.GetClientPosition(); +PRectangle ScintillaGTK::GetClientRectangle() const { + Window &win = const_cast(wMain); + PRectangle rc = win.GetClientPosition(); if (verticalScrollBarVisible) rc.right -= verticalScrollBarWidth; if (horizontalScrollBarVisible && !Wrapping()) -- cgit v1.2.3