analysis: Use static functions when possible
authorDamien Lespiau <damien.lespiau@intel.com>
Thu, 27 May 2010 12:28:43 +0000 (13:28 +0100)
committerDamien Lespiau <damien.lespiau@intel.com>
Tue, 1 Jun 2010 11:08:18 +0000 (12:08 +0100)
It's best to ensure the functions only used in one compilation unit are
marked as static so GCC can inline them if it feels like it.

clutter/clutter-bezier.c
clutter/cogl/cogl/cogl-clip-stack.c
clutter/cogl/cogl/cogl-clip-state.c

index 3c2f827..f4c480c 100644 (file)
@@ -153,7 +153,7 @@ _clutter_bezier_t2x (const ClutterBezier * b, _FixedT t)
     + b->dx;
 }
 
-gint
+static gint
 _clutter_bezier_t2y (const ClutterBezier * b, _FixedT t)
 {
   /*
index 87a2163..946790e 100644 (file)
@@ -285,7 +285,7 @@ set_clip_planes (float x_1,
     }
 }
 
-void
+static void
 add_stencil_clip_rectangle (float x_1,
                             float y_1,
                             float x_2,
index 41ad062..bb8ec1e 100644 (file)
@@ -118,7 +118,7 @@ transform_point (CoglMatrix *matrix_mv,
 
 /* Try to push a rectangle given in object coordinates as a rectangle in window
  * coordinates instead of object coordinates */
-gboolean
+static gboolean
 try_pushing_rect_as_window_rect (float x_1,
                                  float y_1,
                                  float x_2,