[gtk/wip/matthiasc/css-values: 12/14] styleanimation: Cut down on checks



commit 233bd81df6ed73d1e3920c2a802c319e9611167e
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jan 12 22:26:17 2020 -0500

    styleanimation: Cut down on checks

 gtk/gtkstyleanimation.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkstyleanimation.c b/gtk/gtkstyleanimation.c
index 89f8319fba..adf0b577d3 100644
--- a/gtk/gtkstyleanimation.c
+++ b/gtk/gtkstyleanimation.c
@@ -20,6 +20,7 @@
 #include "config.h"
 
 #include "gtkstyleanimationprivate.h"
+#include "gtkprivate.h"
 
 G_DEFINE_ABSTRACT_TYPE (GtkStyleAnimation, _gtk_style_animation, G_TYPE_OBJECT)
 
@@ -68,7 +69,7 @@ _gtk_style_animation_advance (GtkStyleAnimation    *animation,
 {
   GtkStyleAnimationClass *klass;
 
-  g_return_val_if_fail (GTK_IS_STYLE_ANIMATION (animation), NULL);
+  gtk_internal_return_val_if_fail (GTK_IS_STYLE_ANIMATION (animation), NULL);
 
   klass = GTK_STYLE_ANIMATION_GET_CLASS (animation);
 
@@ -81,8 +82,8 @@ _gtk_style_animation_apply_values (GtkStyleAnimation    *animation,
 {
   GtkStyleAnimationClass *klass;
 
-  g_return_if_fail (GTK_IS_STYLE_ANIMATION (animation));
-  g_return_if_fail (GTK_IS_CSS_ANIMATED_STYLE (style));
+  gtk_internal_return_if_fail (GTK_IS_STYLE_ANIMATION (animation));
+  gtk_internal_return_if_fail (GTK_IS_CSS_ANIMATED_STYLE (style));
 
   klass = GTK_STYLE_ANIMATION_GET_CLASS (animation);
 
@@ -94,7 +95,7 @@ _gtk_style_animation_is_finished (GtkStyleAnimation *animation)
 {
   GtkStyleAnimationClass *klass;
 
-  g_return_val_if_fail (GTK_IS_STYLE_ANIMATION (animation), TRUE);
+  gtk_internal_return_val_if_fail (GTK_IS_STYLE_ANIMATION (animation), TRUE);
 
   klass = GTK_STYLE_ANIMATION_GET_CLASS (animation);
 
@@ -117,7 +118,7 @@ _gtk_style_animation_is_static (GtkStyleAnimation *animation)
 {
   GtkStyleAnimationClass *klass;
 
-  g_return_val_if_fail (GTK_IS_STYLE_ANIMATION (animation), TRUE);
+  gtk_internal_return_val_if_fail (GTK_IS_STYLE_ANIMATION (animation), TRUE);
 
   klass = GTK_STYLE_ANIMATION_GET_CLASS (animation);
 


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