Commit: d715573aea95b91143e6e181d0100e69c6dab93c Author: Campbell Barton Date: Thu Dec 15 15:10:51 2022 +1100 Branches: master https://developer.blender.org/rBd715573aea95b91143e6e181d0100e69c6dab93c
Cleanup: declare GHOST_Window::getCursorGrabBounds as const Needed so it the method can be called on a cosnt GHOST_Window. =================================================================== M intern/ghost/GHOST_IWindow.h M intern/ghost/intern/GHOST_Window.cpp M intern/ghost/intern/GHOST_Window.h =================================================================== 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, _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs