From: Tim-Philipp Müller Date: Mon, 26 Dec 2011 11:26:05 +0000 (+0000) Subject: value: micro-optimisation: avoid some unnecessary g_value_unset() X-Git-Tag: RELEASE-0.11.2~16^2~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ee7f9f422870268a2816b1488b30f156cc71968a;p=platform%2Fupstream%2Fgstreamer.git value: micro-optimisation: avoid some unnecessary g_value_unset() We know there's nothing to do here and can save us the function calls and GValueTable lookups. --- diff --git a/gst/gstvalue.c b/gst/gstvalue.c index 4f2b80d..bf9bb13 100644 --- a/gst/gstvalue.c +++ b/gst/gstvalue.c @@ -1315,8 +1315,9 @@ gst_value_free_fraction_range (GValue * value) GValue *vals = (GValue *) value->data[0].v_pointer; if (vals != NULL) { - g_value_unset (&vals[0]); - g_value_unset (&vals[1]); + /* we know the two values contain fractions without internal allocs */ + /* g_value_unset (&vals[0]); */ + /* g_value_unset (&vals[1]); */ g_slice_free1 (2 * sizeof (GValue), vals); value->data[0].v_pointer = NULL; } @@ -1465,8 +1466,9 @@ gst_value_set_fraction_range_full (GValue * value, gst_value_set_fraction (&end, numerator_end, denominator_end); gst_value_set_fraction_range (value, &start, &end); - g_value_unset (&start); - g_value_unset (&end); + /* we know the two values contain fractions without internal allocs */ + /* g_value_unset (&start); */ + /* g_value_unset (&end); */ } /**