]> source.dussan.org Git - tigervnc.git/commitdiff
Use "static" for helper functions
authorPierre Ossman <ossman@cendio.se>
Sun, 21 Apr 2024 00:23:46 +0000 (02:23 +0200)
committerPierre Ossman <ossman@cendio.se>
Mon, 24 Jun 2024 12:20:40 +0000 (14:20 +0200)
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
vncviewer/MonitorIndicesParameter.h

index df30ebc2b30bf5993119a7f1f9aa57633947f2c7..2b31703a9e64680e79c837bc8e00317ff897bc6d 100644 (file)
@@ -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);
index 80512c328a69e5b6fad187c923d135c9fe567529..e71439a8264e6400c69cb2f88841b8f48c891126 100644 (file)
@@ -36,8 +36,8 @@ private:
         int fltkIndex;
     } Monitor;
 
-    bool parseIndices(const char* value, std::set<int> *indices,
-                      bool complain=false);
+    static bool parseIndices(const char* value, std::set<int> *indices,
+                             bool complain=false);
     std::vector<MonitorIndicesParameter::Monitor> fetchMonitors();
     static int compare(const void*, const void*);
 };