gegl r2832 - in trunk: . gegl/operation



Author: ok
Date: Sun Dec 28 01:20:07 2008
New Revision: 2832
URL: http://svn.gnome.org/viewvc/gegl?rev=2832&view=rev

Log:
Simplified code for functions returning a dereferenced on stack
GeglRectangle structs from *roi arguments.
* gegl/operation/gegl-operation-composer.c:
(get_required_for_output):
* gegl/operation/gegl-operation-composer3.c:
(get_required_for_output):
* gegl/operation/gegl-operation-filter.c:
(get_required_for_output):
* gegl/operation/gegl-operation-source.c: (get_cached_region):
* gegl/operation/gegl-operation.c: (get_required_for_output):


Modified:
   trunk/ChangeLog
   trunk/gegl/operation/gegl-operation-composer.c
   trunk/gegl/operation/gegl-operation-composer3.c
   trunk/gegl/operation/gegl-operation-filter.c
   trunk/gegl/operation/gegl-operation-source.c
   trunk/gegl/operation/gegl-operation.c

Modified: trunk/gegl/operation/gegl-operation-composer.c
==============================================================================
--- trunk/gegl/operation/gegl-operation-composer.c	(original)
+++ trunk/gegl/operation/gegl-operation-composer.c	Sun Dec 28 01:20:07 2008
@@ -215,8 +215,7 @@
                          const gchar         *input_pad,
                          const GeglRectangle *roi)
 {
-  GeglRectangle rect = *roi;
-  return rect;
+  return *roi;
 }
 
 static GeglNode *

Modified: trunk/gegl/operation/gegl-operation-composer3.c
==============================================================================
--- trunk/gegl/operation/gegl-operation-composer3.c	(original)
+++ trunk/gegl/operation/gegl-operation-composer3.c	Sun Dec 28 01:20:07 2008
@@ -246,8 +246,7 @@
                          const gchar         *input_pad,
                          const GeglRectangle *roi)
 {
-  GeglRectangle rect = *roi;
-  return rect;
+  return *roi;
 }
 
 static GeglNode *

Modified: trunk/gegl/operation/gegl-operation-filter.c
==============================================================================
--- trunk/gegl/operation/gegl-operation-filter.c	(original)
+++ trunk/gegl/operation/gegl-operation-filter.c	Sun Dec 28 01:20:07 2008
@@ -244,6 +244,5 @@
                          const gchar         *input_pad,
                          const GeglRectangle *roi)
 {
-  GeglRectangle result = *roi;
-  return result;
+  return *roi;
 }

Modified: trunk/gegl/operation/gegl-operation-source.c
==============================================================================
--- trunk/gegl/operation/gegl-operation-source.c	(original)
+++ trunk/gegl/operation/gegl-operation-source.c	Sun Dec 28 01:20:07 2008
@@ -164,8 +164,5 @@
 get_cached_region (GeglOperation       *operation,
                    const GeglRectangle *roi)
 {
-  GeglRectangle result = *roi;
-  /*result = operation->node->have_rect;*/
-  result = *roi;
-  return result;
+  return *roi;
 }

Modified: trunk/gegl/operation/gegl-operation.c
==============================================================================
--- trunk/gegl/operation/gegl-operation.c	(original)
+++ trunk/gegl/operation/gegl-operation.c	Sun Dec 28 01:20:07 2008
@@ -164,14 +164,12 @@
                          const gchar         *input_pad,
                          const GeglRectangle *roi)
 {
-  GeglRectangle result = *roi;
-
   if (operation->node->is_graph)
     {
       return gegl_operation_get_required_for_output (operation, input_pad, roi);
     }
 
-  return result;
+  return *roi;
 }
 
 GeglRectangle



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