From fe74625d78e9feb8c401023724097262f0ac0d82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Thu, 21 Mar 2019 20:55:31 +0100 Subject: [PATCH] Fix const correctness of `RTSurface::get()` --- rtgui/rtsurface.cc | 7 ++++++- rtgui/rtsurface.h | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/rtgui/rtsurface.cc b/rtgui/rtsurface.cc index 9f692878d..e2ae41f49 100644 --- a/rtgui/rtsurface.cc +++ b/rtgui/rtsurface.cc @@ -133,7 +133,12 @@ bool RTSurface::hasSurface() const return surface ? true : false; } -const Cairo::RefPtr& RTSurface::get() const +Cairo::RefPtr RTSurface::get() const +{ + return surface; +} + +const Cairo::RefPtr& RTSurface::get() { return surface; } diff --git a/rtgui/rtsurface.h b/rtgui/rtsurface.h index d55506269..64e68d7a1 100644 --- a/rtgui/rtsurface.h +++ b/rtgui/rtsurface.h @@ -45,7 +45,8 @@ public: int getHeight() const; bool hasSurface() const; - const Cairo::RefPtr& get() const; + Cairo::RefPtr get() const; + const Cairo::RefPtr& get(); static void init(); static void updateImages ();