[gnome-photos/wip/rishi/misc-fixes: 6/6] base-item: Don't read guint64 properties as gsize



commit 376d5957bf45e17796939df9d6898b4f663cd2d9
Author: Debarshi Ray <debarshir gnome org>
Date:   Sun Jan 3 18:24:58 2016 +0100

    base-item: Don't read guint64 properties as gsize
    
    It's probably more portable to be pedantic about such things, and even
    if it isn't, avoiding hairy assumptions is always good.

 src/photos-base-item.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index 4ab5d96..c55e11d 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -1013,7 +1013,7 @@ photos_base_item_save_guess_sizes_from_buffer (GeglBuffer *buffer,
   GeglNode *buffer_source;
   GeglNode *graph;
   GeglNode *guess_sizes;
-  gsize sizes[2];
+  guint64 sizes[2];
 
   graph = gegl_node_new ();
   buffer_source = gegl_node_new_child (graph, "operation", "gegl:buffer-source", "buffer", buffer, NULL);
@@ -1038,9 +1038,9 @@ photos_base_item_save_guess_sizes_from_buffer (GeglBuffer *buffer,
 
   gegl_node_get (guess_sizes, "size", &sizes[0], "size-1", &sizes[1], NULL);
   if (out_size != NULL)
-    *out_size = sizes[0];
+    *out_size = (gsize) sizes[0];
   if (out_size_1 != NULL)
-    *out_size_1 = sizes[1];
+    *out_size_1 = (gsize) sizes[1];
 
   g_object_unref (graph);
 }


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