[gegl: 17/25] sampler-nearest: fix various careless syntax errors



commit b26d507bdd0ecd945e81cde42507b3761304171a
Author: Nicolas Robidoux <nrobidoux git gnome org>
Date:   Sat Nov 24 09:46:46 2012 -0500

    sampler-nearest: fix various careless syntax errors

 gegl/buffer/gegl-sampler-nearest.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/gegl/buffer/gegl-sampler-nearest.c b/gegl/buffer/gegl-sampler-nearest.c
index 28471db..e107ad9 100644
--- a/gegl/buffer/gegl-sampler-nearest.c
+++ b/gegl/buffer/gegl-sampler-nearest.c
@@ -37,7 +37,7 @@ gegl_sampler_nearest_get (      GeglSampler*    restrict  self,
                           const gdouble                   absolute_x,
                           const gdouble                   absolute_y,
                                 GeglMatrix2              *scale,
-                                void*           restrict *output,
+                                void*           restrict  output,
                                 GeglAbyssPolicy           repeat_mode);
 
 G_DEFINE_TYPE (GeglSamplerNearest, gegl_sampler_nearest, GEGL_TYPE_SAMPLER)
@@ -70,11 +70,9 @@ gegl_sampler_nearest_get (      GeglSampler*    restrict  self,
                           const gdouble                   absolute_x,
                           const gdouble                   absolute_y,
                                 GeglMatrix2              *scale,
-                                void*           restrict *output,
-                                GeglAbyssPolicy           repeat_mode);
+                                void*           restrict  output,
+                                GeglAbyssPolicy           repeat_mode)
 {
-  gfloat *sampler_bptr;
-
   /*
    * The reason why floor of the absolute position gives the nearest
    * pixel (with ties resolved toward -infinity) is that the absolute
@@ -84,7 +82,7 @@ gegl_sampler_nearest_get (      GeglSampler*    restrict  self,
    * positions were center-based).
    */
   const gint channels = 4;
-  gfloat newval[4];
+  gfloat newval[channels];
   const gfloat* restrict in_bptr =
     gegl_sampler_get_ptr (self,
                           (gint) floor ((double) absolute_x),



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]