[Bf-blender-cvs] [c1537d4134a] blender-v3.4-release: Cleanup: declare GHOST_Window::getCursorGrabBounds as const
Campbell Barton
noreply at git.blender.org
Fri Dec 16 16:03:32 CET 2022
Commit: c1537d4134a90d1b83eccd7269c1bab530860d04
Author: Campbell Barton
Date: Thu Dec 15 15:10:51 2022 +1100
Branches: blender-v3.4-release
https://developer.blender.org/rBc1537d4134a90d1b83eccd7269c1bab530860d04
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 f712d9bd9f0..fbc2fbd0b7d 100644
--- a/intern/ghost/GHOST_IWindow.h
+++ b/intern/ghost/GHOST_IWindow.h
@@ -254,7 +254,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 eaa4cdcffac..e1e49f367d6 100644
--- a/intern/ghost/intern/GHOST_Window.cpp
+++ b/intern/ghost/intern/GHOST_Window.cpp
@@ -159,7 +159,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 396691fa161..efc4c7a17b7 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,
More information about the Bf-blender-cvs
mailing list