summaryrefslogtreecommitdiff
path: root/gtk/gtkcssstaticstyle.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2019-08-22 12:14:33 +0200
committerTimm Bäder <mail@baedert.org>2019-09-09 17:36:24 +0200
commitf3fdf58ff795213832e311ea5d40c4e074d54609 (patch)
tree49081100e213aaf408f3a51d5e63bca0a1265882 /gtk/gtkcssstaticstyle.c
parent3073e6585129e013170ea518152345c7883a70fa (diff)
downloadgtk+-f3fdf58ff795213832e311ea5d40c4e074d54609.tar.gz
cssstaticstyle: Avoid ref'ing specified value in compute_value
There are alerady _get functions for GtkCssInheritValue and GtkCssInitialValue, so use those. We can avoid a ref+unref pair this way.
Diffstat (limited to 'gtk/gtkcssstaticstyle.c')
-rw-r--r--gtk/gtkcssstaticstyle.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/gtk/gtkcssstaticstyle.c b/gtk/gtkcssstaticstyle.c
index 7f7eba14ab..f2e0b1db16 100644
--- a/gtk/gtkcssstaticstyle.c
+++ b/gtk/gtkcssstaticstyle.c
@@ -219,19 +219,14 @@ gtk_css_static_style_compute_value (GtkCssStaticStyle *style,
GtkCssStyleProperty *prop = _gtk_css_style_property_lookup_by_id (id);
if (_gtk_css_style_property_is_inherit (prop))
- specified = _gtk_css_inherit_value_new ();
+ specified = _gtk_css_inherit_value_get ();
else
- specified = _gtk_css_initial_value_new ();
+ specified = _gtk_css_initial_value_get ();
}
- else
- _gtk_css_value_ref (specified);
value = _gtk_css_value_compute (specified, id, provider, (GtkCssStyle *)style, parent_style);
gtk_css_static_style_set_value (style, id, value, section);
- value = NULL;
-
- _gtk_css_value_unref (specified);
}
GtkCssChange