From d715573aea95b91143e6e181d0100e69c6dab93c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 15 Dec 2022 15:10:51 +1100 Subject: [PATCH] Cleanup: declare GHOST_Window::getCursorGrabBounds as const Needed so it the method can be called on a cosnt GHOST_Window. --- intern/ghost/GHOST_IWindow.h | 2 +- intern/ghost/intern/GHOST_Window.cpp | 2 +- intern/ghost/intern/GHOST_Window.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/intern/ghost/GHOST_IWindow.h b/intern/ghost/GHOST_IWindow.h index 33b9d160f0f..403f9e388cc 100644 --- a/intern/ghost/GHOST_IWindow.h +++ b/intern/ghost/GHOST_IWindow.h @@ -274,7 +274,7 @@ class GHOST_IWindow { */ virtual GHOST_TSuccess setCursorShape(GHOST_TStandardCursor cursorShape) = 0; - virtual GHOST_TSuccess getCursorGrabBounds(GHOST_Rect &bounds) = 0; + virtual GHOST_TSuccess getCursorGrabBounds(GHOST_Rect &bounds) const = 0; virtual void getCursorGrabState(GHOST_TGrabCursorMode &mode, GHOST_TAxisFlag &axis_flag, diff --git a/intern/ghost/intern/GHOST_Window.cpp b/intern/ghost/intern/GHOST_Window.cpp index 144bfeab373..202f803f710 100644 --- a/intern/ghost/intern/GHOST_Window.cpp +++ b/intern/ghost/intern/GHOST_Window.cpp @@ -175,7 +175,7 @@ GHOST_TSuccess GHOST_Window::setCursorGrab(GHOST_TGrabCursorMode mode, return GHOST_kFailure; } -GHOST_TSuccess GHOST_Window::getCursorGrabBounds(GHOST_Rect &bounds) +GHOST_TSuccess GHOST_Window::getCursorGrabBounds(GHOST_Rect &bounds) const { if (m_cursorGrab != GHOST_kGrabWrap) { return GHOST_kFailure; diff --git a/intern/ghost/intern/GHOST_Window.h b/intern/ghost/intern/GHOST_Window.h index 741ce786859..04ce9fed950 100644 --- a/intern/ghost/intern/GHOST_Window.h +++ b/intern/ghost/intern/GHOST_Window.h @@ -152,7 +152,7 @@ class GHOST_Window : public GHOST_IWindow { * Gets the cursor grab region, if unset the window is used. * reset when grab is disabled. */ - GHOST_TSuccess getCursorGrabBounds(GHOST_Rect &bounds) override; + GHOST_TSuccess getCursorGrabBounds(GHOST_Rect &bounds) const override; void getCursorGrabState(GHOST_TGrabCursorMode &mode, GHOST_TAxisFlag &axis_flag,