[gegl] Simplify gegl_buffer_set_extent
- From: Daniel Sabo <daniels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] Simplify gegl_buffer_set_extent
- Date: Sat, 12 Oct 2013 11:38:47 +0000 (UTC)
commit 3d007cebaf12451af19dc57882fa07ec6bda6ed4
Author: Daniel Sabo <DanielSabo gmail com>
Date: Tue Oct 8 05:06:11 2013 -0700
Simplify gegl_buffer_set_extent
gegl/buffer/gegl-buffer.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer.c b/gegl/buffer/gegl-buffer.c
index 16c04e7..53b12c2 100644
--- a/gegl/buffer/gegl-buffer.c
+++ b/gegl/buffer/gegl-buffer.c
@@ -331,14 +331,16 @@ gboolean
gegl_buffer_set_extent (GeglBuffer *buffer,
const GeglRectangle *extent)
{
+ GeglBufferHeader *header;
+
g_return_val_if_fail (GEGL_IS_BUFFER (buffer), FALSE);
- (*(GeglRectangle*) gegl_buffer_get_extent (buffer)) = *extent;
+ buffer->extent = *extent;
+
+ header = gegl_buffer_backend (buffer)->priv->header;
- if ((GeglBufferHeader*)(gegl_buffer_backend (buffer)->priv->header))
+ if (header)
{
- GeglBufferHeader *header =
- ((GeglBufferHeader*)(gegl_buffer_backend (buffer)->priv->header));
header->x = buffer->extent.x;
header->y = buffer->extent.y;
header->width = buffer->extent.width;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]