[Bf-blender-cvs] [d799388b021] master: Cleanup: quiet unused argument warnings and minor changes in GHOST

Campbell Barton noreply at git.blender.org
Fri Oct 28 08:08:40 CEST 2022


Commit: d799388b021fe9a0163b6f970c836b858a137449
Author: Campbell Barton
Date:   Fri Oct 28 17:05:13 2022 +1100
Branches: master
https://developer.blender.org/rBd799388b021fe9a0163b6f970c836b858a137449

Cleanup: quiet unused argument warnings and minor changes in GHOST

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

M	intern/ghost/CMakeLists.txt
M	intern/ghost/intern/GHOST_System.h
M	intern/ghost/intern/GHOST_SystemWayland.cpp
M	intern/ghost/intern/GHOST_Window.h

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

diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt
index fb10530bfae..ea21d831b0c 100644
--- a/intern/ghost/CMakeLists.txt
+++ b/intern/ghost/CMakeLists.txt
@@ -385,9 +385,9 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND)
       "${WAYLAND_PROTOCOLS_DIR}/unstable/primary-selection/primary-selection-unstable-v1.xml"
     )
 
-    add_definitions(-DWITH_GHOST_WAYLAND)
-
     unset(INC_DST)
+
+    add_definitions(-DWITH_GHOST_WAYLAND)
   endif()
 
   if(WITH_INPUT_NDOF)
diff --git a/intern/ghost/intern/GHOST_System.h b/intern/ghost/intern/GHOST_System.h
index 810f828a8a1..924a4bff790 100644
--- a/intern/ghost/intern/GHOST_System.h
+++ b/intern/ghost/intern/GHOST_System.h
@@ -76,7 +76,7 @@ class GHOST_System : public GHOST_ISystem {
   GHOST_ITimerTask *installTimer(uint64_t delay,
                                  uint64_t interval,
                                  GHOST_TimerProcPtr timerProc,
-                                 GHOST_TUserDataPtr userData = NULL);
+                                 GHOST_TUserDataPtr userData = nullptr);
 
   /**
    * Removes a timer.
diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp
index 88540dc4260..f3dc1609e69 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@ -777,13 +777,14 @@ struct GWL_Display {
   std::vector<GWL_Output *> outputs;
   std::vector<GWL_Seat *> seats;
 
+  /* Managers. */
   struct wl_data_device_manager *wl_data_device_manager = nullptr;
   struct zwp_tablet_manager_v2 *wp_tablet_manager = nullptr;
   struct zwp_relative_pointer_manager_v1 *wp_relative_pointer_manager = nullptr;
+  struct zwp_primary_selection_device_manager_v1 *wp_primary_selection_device_manager = nullptr;
+
   struct zwp_pointer_constraints_v1 *wp_pointer_constraints = nullptr;
   struct zwp_pointer_gestures_v1 *wp_pointer_gestures = nullptr;
-
-  struct zwp_primary_selection_device_manager_v1 *wp_primary_selection_device_manager = nullptr;
 };
 
 /**
diff --git a/intern/ghost/intern/GHOST_Window.h b/intern/ghost/intern/GHOST_Window.h
index 1c0991bba30..396691fa161 100644
--- a/intern/ghost/intern/GHOST_Window.h
+++ b/intern/ghost/intern/GHOST_Window.h
@@ -74,7 +74,7 @@ class GHOST_Window : public GHOST_IWindow {
    */
   virtual bool getValid() const override
   {
-    return m_context != NULL;
+    return m_context != nullptr;
   }
 
   /**
@@ -283,8 +283,9 @@ class GHOST_Window : public GHOST_IWindow {
 
   float getNativePixelSize(void) override
   {
-    if (m_nativePixelSize > 0.0f)
+    if (m_nativePixelSize > 0.0f) {
       return m_nativePixelSize;
+    }
     return 1.0f;
   }
 
@@ -298,7 +299,8 @@ class GHOST_Window : public GHOST_IWindow {
   }
 
 #ifdef WITH_INPUT_IME
-  virtual void beginIME(int32_t x, int32_t y, int32_t w, int32_t h, bool completed) override
+  virtual void beginIME(
+      int32_t /*x*/, int32_t /*y*/, int32_t /*w*/, int32_t /*h*/, bool /*completed*/) override
   {
     /* do nothing temporarily if not in windows */
   }



More information about the Bf-blender-cvs mailing list