From 4a71ac5bb79e3cd53499255f231c490fc9a5627b Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Sun, 21 Apr 2024 02:23:46 +0200 Subject: [PATCH] Use "static" for helper functions These functions act only on the input parameters, so let's make them static to more clearly indicate that they do not act upon any object. --- vncviewer/GestureHandler.h | 2 +- vncviewer/MonitorIndicesParameter.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vncviewer/GestureHandler.h b/vncviewer/GestureHandler.h index df30ebc2..2b31703a 100644 --- a/vncviewer/GestureHandler.h +++ b/vncviewer/GestureHandler.h @@ -47,7 +47,7 @@ class GestureHandler : public rfb::Timer::Callback { void twoTouchTimeout(); void pushEvent(GestureEventType t); - GestureEventGesture stateToGesture(unsigned char state); + static GestureEventGesture stateToGesture(unsigned char state); void getPosition(double *firstX, double *firstY, double *lastX, double *lastY); diff --git a/vncviewer/MonitorIndicesParameter.h b/vncviewer/MonitorIndicesParameter.h index 80512c32..e71439a8 100644 --- a/vncviewer/MonitorIndicesParameter.h +++ b/vncviewer/MonitorIndicesParameter.h @@ -36,8 +36,8 @@ private: int fltkIndex; } Monitor; - bool parseIndices(const char* value, std::set *indices, - bool complain=false); + static bool parseIndices(const char* value, std::set *indices, + bool complain=false); std::vector fetchMonitors(); static int compare(const void*, const void*); }; -- 2.39.5