[Bf-blender-cvs] [e190b70946b] master: Cleanup: declare GHOST/Wayland methods const

Campbell Barton noreply at git.blender.org
Thu Jun 30 15:49:16 CEST 2022


Commit: e190b70946b776cb105f8987c4cf1ec5157e75d0
Author: Campbell Barton
Date:   Thu Jun 30 22:53:08 2022 +1000
Branches: master
https://developer.blender.org/rBe190b70946b776cb105f8987c4cf1ec5157e75d0

Cleanup: declare GHOST/Wayland methods const

Needed when called by functions that are const too.

===================================================================

M	intern/ghost/intern/GHOST_WindowWayland.cpp
M	intern/ghost/intern/GHOST_WindowWayland.h

===================================================================

diff --git a/intern/ghost/intern/GHOST_WindowWayland.cpp b/intern/ghost/intern/GHOST_WindowWayland.cpp
index a1936d3667c..27c2a09465d 100644
--- a/intern/ghost/intern/GHOST_WindowWayland.cpp
+++ b/intern/ghost/intern/GHOST_WindowWayland.cpp
@@ -591,12 +591,12 @@ bool GHOST_WindowWayland::outputs_leave(output_t *reg_output)
   return true;
 }
 
-uint16_t GHOST_WindowWayland::dpi()
+uint16_t GHOST_WindowWayland::dpi() const
 {
   return w->dpi;
 }
 
-int GHOST_WindowWayland::scale()
+int GHOST_WindowWayland::scale() const
 {
   return w->scale;
 }
diff --git a/intern/ghost/intern/GHOST_WindowWayland.h b/intern/ghost/intern/GHOST_WindowWayland.h
index 89354c54c0f..b5aeecd6204 100644
--- a/intern/ghost/intern/GHOST_WindowWayland.h
+++ b/intern/ghost/intern/GHOST_WindowWayland.h
@@ -113,9 +113,9 @@ class GHOST_WindowWayland : public GHOST_Window {
   bool outputs_leave(output_t *reg_output);
   bool outputs_changed_update_scale();
 
-  uint16_t dpi();
+  uint16_t dpi() const;
 
-  int scale();
+  int scale() const;
 
  private:
   GHOST_SystemWayland *m_system;



More information about the Bf-blender-cvs mailing list