From: Pierre Ossman Date: Sun, 21 Apr 2024 00:23:46 +0000 (+0200) Subject: Use "static" for helper functions X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4a71ac5bb79e3cd53499255f231c490fc9a5627b;p=tigervnc.git 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. --- 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*); };