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



commit c96c1584c7870ad978439fbd8cc291c5c341325f
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 d66423e..0e83e5b 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);
@@ -1033,9 +1033,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]