[gtk+] csscomputedvalues: Inline function
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] csscomputedvalues: Inline function
- Date: Mon, 17 Sep 2012 19:15:28 +0000 (UTC)
commit 89d6d34bee77d12252a333836ef3800c0a098844
Author: Benjamin Otte <otte redhat com>
Date: Thu Sep 13 14:15:22 2012 +0200
csscomputedvalues: Inline function
gtk/gtkcsscomputedvalues.c | 15 ++++-----------
1 files changed, 4 insertions(+), 11 deletions(-)
---
diff --git a/gtk/gtkcsscomputedvalues.c b/gtk/gtkcsscomputedvalues.c
index efca159..7f651a9 100644
--- a/gtk/gtkcsscomputedvalues.c
+++ b/gtk/gtkcsscomputedvalues.c
@@ -90,16 +90,6 @@ maybe_unref_section (gpointer section)
gtk_css_section_unref (section);
}
-static void
-gtk_css_computed_values_ensure_array (GtkCssComputedValues *values,
- guint at_least_size)
-{
- if (values->values == NULL)
- values->values = g_ptr_array_new_with_free_func ((GDestroyNotify)_gtk_css_value_unref);
- if (at_least_size > values->values->len)
- g_ptr_array_set_size (values->values, at_least_size);
-}
-
void
_gtk_css_computed_values_compute_value (GtkCssComputedValues *values,
GtkStyleContext *context,
@@ -147,7 +137,10 @@ _gtk_css_computed_values_set_value (GtkCssComputedValues *values,
{
g_return_if_fail (GTK_IS_CSS_COMPUTED_VALUES (values));
- gtk_css_computed_values_ensure_array (values, id + 1);
+ if (values->values == NULL)
+ values->values = g_ptr_array_new_with_free_func ((GDestroyNotify)_gtk_css_value_unref);
+ if (id >= values->values->len)
+ g_ptr_array_set_size (values->values, id + 1);
if (g_ptr_array_index (values->values, id))
_gtk_css_value_unref (g_ptr_array_index (values->values, id));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]