[gegl] buffer: remove type safetey from a few casts
- From: Ãyvind KolÃs <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] buffer: remove type safetey from a few casts
- Date: Thu, 3 May 2012 22:13:02 +0000 (UTC)
commit 8a2b105eba12aa42a7a52e862de9219404d4443c
Author: Ãyvind KolÃs <pippin gimp org>
Date: Fri May 4 00:11:57 2012 +0200
buffer: remove type safetey from a few casts
gegl/buffer/gegl-tile-handler-cache.c | 14 +++++++-------
gegl/buffer/gegl-tile-handler-empty.c | 4 ++--
2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/gegl/buffer/gegl-tile-handler-cache.c b/gegl/buffer/gegl-tile-handler-cache.c
index a0bc2f6..519ad38 100644
--- a/gegl/buffer/gegl-tile-handler-cache.c
+++ b/gegl/buffer/gegl-tile-handler-cache.c
@@ -181,7 +181,7 @@ gegl_tile_handler_cache_dispose (GObject *object)
CacheItem *item;
GSList *iter;
- cache = GEGL_TILE_HANDLER_CACHE (object);
+ cache = (GeglTileHandlerCache*) (object);
/* only throw out items belonging to this cache instance */
@@ -226,11 +226,11 @@ gegl_tile_handler_cache_get_tile_command (GeglTileSource *tile_store,
gint y,
gint z)
{
- GeglTileHandlerCache *cache = GEGL_TILE_HANDLER_CACHE (tile_store);
- GeglTileSource *source = GEGL_TILE_HANDLER (tile_store)->source;
+ GeglTileHandlerCache *cache = (GeglTileHandlerCache*) (tile_store);
+ GeglTileSource *source = ((GeglTileHandler*) (tile_store))->source;
GeglTile *tile = NULL;
- if (gegl_cl_is_accelerated ())
+ if (G_UNLIKELY (gegl_cl_is_accelerated ()))
gegl_buffer_cl_cache_flush2 (cache, NULL);
tile = gegl_tile_handler_cache_get_tile (cache, x, y, z);
@@ -262,8 +262,8 @@ gegl_tile_handler_cache_command (GeglTileSource *tile_store,
gint z,
gpointer data)
{
- GeglTileHandler *handler = GEGL_TILE_HANDLER (tile_store);
- GeglTileHandlerCache *cache = GEGL_TILE_HANDLER_CACHE (handler);
+ GeglTileHandler *handler = (GeglTileHandler*) (tile_store);
+ GeglTileHandlerCache *cache = (GeglTileHandlerCache*) (handler);
switch (command)
{
@@ -272,7 +272,7 @@ gegl_tile_handler_cache_command (GeglTileSource *tile_store,
GList *link;
if (gegl_cl_is_accelerated ())
- gegl_buffer_cl_cache_flush2 (GEGL_TILE_HANDLER_CACHE (tile_store), NULL);
+ gegl_buffer_cl_cache_flush2 (cache, NULL);
if (cache->count)
{
diff --git a/gegl/buffer/gegl-tile-handler-empty.c b/gegl/buffer/gegl-tile-handler-empty.c
index e6a775a..d320f6d 100644
--- a/gegl/buffer/gegl-tile-handler-empty.c
+++ b/gegl/buffer/gegl-tile-handler-empty.c
@@ -49,8 +49,8 @@ get_tile (GeglTileSource *gegl_tile_source,
gint y,
gint z)
{
- GeglTileSource *source = GEGL_TILE_HANDLER (gegl_tile_source)->source;
- GeglTileHandlerEmpty *empty = GEGL_TILE_HANDLER_EMPTY (gegl_tile_source);
+ GeglTileSource *source = ((GeglTileHandler*)(gegl_tile_source))->source;
+ GeglTileHandlerEmpty *empty = (GeglTileHandlerEmpty*) (gegl_tile_source);
GeglTile *tile = NULL;
if (source)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]