[gegl] buffer: in cache handler and swap backend, use g_hash_table_add() ...
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] buffer: in cache handler and swap backend, use g_hash_table_add() ...
- Date: Wed, 6 May 2020 11:27:07 +0000 (UTC)
commit 1ad6d536ddd22e64b2d0ed4fb4b918722bc03546
Author: Ell <ell_se yahoo com>
Date: Wed May 6 14:25:51 2020 +0300
buffer: in cache handler and swap backend, use g_hash_table_add() ...
... instead of g_hash_table_insert()
gegl/buffer/gegl-tile-backend-swap.c | 4 ++--
gegl/buffer/gegl-tile-handler-cache.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gegl/buffer/gegl-tile-backend-swap.c b/gegl/buffer/gegl-tile-backend-swap.c
index 89bcddbdf..9a84d6d95 100644
--- a/gegl/buffer/gegl-tile-backend-swap.c
+++ b/gegl/buffer/gegl-tile-backend-swap.c
@@ -1173,7 +1173,7 @@ gegl_tile_backend_swap_set_tile (GeglTileSource *self,
else
{
entry = gegl_tile_backend_swap_entry_create (swap, x, y, z, src_block);
- g_hash_table_insert (swap->index, entry, entry);
+ g_hash_table_add (swap->index, entry);
}
if (! src_block)
@@ -1280,7 +1280,7 @@ gegl_tile_backend_swap_copy_tile (GeglTileSource *self,
params->dst_y,
params->dst_z,
entry->block);
- g_hash_table_insert (dst_swap->index, dst_entry, dst_entry);
+ g_hash_table_add (dst_swap->index, dst_entry);
}
return GINT_TO_POINTER (TRUE);
diff --git a/gegl/buffer/gegl-tile-handler-cache.c b/gegl/buffer/gegl-tile-handler-cache.c
index 787bca8be..9e342138c 100644
--- a/gegl/buffer/gegl-tile-handler-cache.c
+++ b/gegl/buffer/gegl-tile-handler-cache.c
@@ -902,7 +902,7 @@ gegl_tile_handler_cache_insert (GeglTileHandlerCache *cache,
else
total = (guintptr) g_atomic_pointer_get (&cache_total);
g_atomic_pointer_add (&cache_total_uncloned, tile->size);
- g_hash_table_insert (cache->items, item, item);
+ g_hash_table_add (cache->items, item);
g_queue_push_head_link (&cache->queue, &item->link);
if (total > gegl_buffer_config ()->tile_cache_size)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]