[gnome-photos] utils: Remove unnecessary function call



commit 08635c43b91a4eeafce6bfedf950521fc5fe076b
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Dec 9 13:40:04 2014 +0100

    utils: Remove unnecessary function call
    
    We are dealing with integers that are usually non-negative so there is
    no need to call floor on the quotient. Just in case the base_size is
    negative, the padding will remain unchanged due to the MAX calculation.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=740624

 src/photos-utils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-utils.c b/src/photos-utils.c
index ddbd450..0980594 100644
--- a/src/photos-utils.c
+++ b/src/photos-utils.c
@@ -134,7 +134,7 @@ photos_utils_create_collection_icon (gint base_size, GList *pixbufs)
    * pixbufs are provided.
    */
 
-  padding = MAX (floor (base_size / 10), 4);
+  padding = MAX (base_size / 10, 4);
   tile_size = (base_size - (3 * padding)) / 2;
 
   context = gtk_style_context_new ();


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