[gnome-todo/gbsneto/listview2: 3/5] timeline: Cleanup unsgined types mixture




commit 0353c0fc62ba22accb53d17a58ce504dc278c4e8
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Sat Sep 26 11:27:33 2020 -0300

    timeline: Cleanup unsgined types mixture

 src/animation/gtd-keyframe-transition.c | 5 +++--
 src/animation/gtd-timeline.c            | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/animation/gtd-keyframe-transition.c b/src/animation/gtd-keyframe-transition.c
index 424e27b..aa95cc7 100644
--- a/src/animation/gtd-keyframe-transition.c
+++ b/src/animation/gtd-keyframe-transition.c
@@ -248,7 +248,8 @@ gtd_keyframe_transition_compute_value (GtdTransition *transition,
     {
       if (p > cur_frame->end)
         {
-          priv->current_frame = MIN (priv->current_frame + 1, priv->frames->len - 1);
+          priv->current_frame = MIN (priv->current_frame + 1,
+                                     (gint) priv->frames->len - 1);
           cur_frame = &g_array_index (priv->frames, KeyFrame, priv->current_frame);
        }
     }
@@ -272,7 +273,7 @@ gtd_keyframe_transition_compute_value (GtdTransition *transition,
       value = gtd_interval_peek_initial_value (interval);
       gtd_interval_set_initial_value (cur_frame->interval, value);
     }
-  else if (priv->current_frame == priv->frames->len - 1)
+  else if (priv->current_frame == (gint) priv->frames->len - 1)
     {
       const GValue *value;
 
diff --git a/src/animation/gtd-timeline.c b/src/animation/gtd-timeline.c
index 19908d4..0d0a3d5 100644
--- a/src/animation/gtd-timeline.c
+++ b/src/animation/gtd-timeline.c
@@ -1151,7 +1151,7 @@ gtd_timeline_advance (GtdTimeline *self,
 
   priv = gtd_timeline_get_instance_private (self);
 
-  priv->elapsed_time = CLAMP (msecs, 0, priv->duration);
+  priv->elapsed_time = MIN (msecs, priv->duration);
 }
 
 /**


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