[gegl] buffer: Set revs to 1 allrady in gegl_tile_new_bare()
- From: Martin Nordholts <martinn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] buffer: Set revs to 1 allrady in gegl_tile_new_bare()
- Date: Fri, 23 Jul 2010 13:38:20 +0000 (UTC)
commit 15f33a16e5c27b2f9d400cb5e520011be71f66af
Author: Martin Nordholts <martinn src gnome org>
Date: Fri Jul 23 14:19:14 2010 +0200
buffer: Set revs to 1 allrady in gegl_tile_new_bare()
Whenever gegl_tile_new_bare() is used, rev and stored_rev is always
set to 1 afterwards, so we might as well do that inside that function.
gegl/buffer/gegl-buffer-linear.c | 2 --
gegl/buffer/gegl-tile.c | 12 ++++--------
2 files changed, 4 insertions(+), 10 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer-linear.c b/gegl/buffer/gegl-buffer-linear.c
index 255e669..fbd2cfc 100644
--- a/gegl/buffer/gegl-buffer-linear.c
+++ b/gegl/buffer/gegl-buffer-linear.c
@@ -84,8 +84,6 @@ gegl_buffer_linear_new_from_data (const gpointer data,
{
GeglTile *tile = gegl_tile_new_bare ();
- tile->rev = 1;
- tile->stored_rev = 1;
tile->tile_storage = buffer->tile_storage;
tile->x = 0;
tile->y = 0;
diff --git a/gegl/buffer/gegl-tile.c b/gegl/buffer/gegl-tile.c
index 4d0daa8..25af601 100644
--- a/gegl/buffer/gegl-tile.c
+++ b/gegl/buffer/gegl-tile.c
@@ -90,8 +90,8 @@ gegl_tile_new_bare (void)
GeglTile *tile = g_slice_new0 (GeglTile);
tile->ref_count = 1;
tile->tile_storage = NULL;
- tile->stored_rev = 0;
- tile->rev = 0;
+ tile->stored_rev = 1;
+ tile->rev = 1;
tile->lock = 0;
tile->data = NULL;
@@ -109,8 +109,6 @@ gegl_tile_dup (GeglTile *src)
{
GeglTile *tile = gegl_tile_new_bare ();
- tile->rev = 1;
- tile->stored_rev = 1;
tile->tile_storage = src->tile_storage;
tile->data = src->data;
tile->size = src->size;
@@ -136,10 +134,8 @@ gegl_tile_new (gint size)
{
GeglTile *tile = gegl_tile_new_bare ();
- tile->data = gegl_malloc (size);
- tile->size = size;
- tile->rev = 1;
- tile->stored_rev = 1;
+ tile->data = gegl_malloc (size);
+ tile->size = size;
return tile;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]