From d799388b021fe9a0163b6f970c836b858a137449 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 28 Oct 2022 17:05:13 +1100 Subject: Cleanup: quiet unused argument warnings and minor changes in GHOST --- intern/ghost/CMakeLists.txt | 4 ++-- intern/ghost/intern/GHOST_System.h | 2 +- intern/ghost/intern/GHOST_SystemWayland.cpp | 5 +++-- intern/ghost/intern/GHOST_Window.h | 8 +++++--- 4 files changed, 11 insertions(+), 8 deletions(-) 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 outputs; std::vector 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 */ } -- cgit v1.2.3