[glib/param-speedups: 5/7] param: Drop a pointless function
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/param-speedups: 5/7] param: Drop a pointless function
- Date: Fri, 20 May 2022 11:34:09 +0000 (UTC)
commit ccd4a0cc7098923f18ac7009f6cc87ffa9d0aa5d
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Sep 29 01:18:02 2021 -0400
param: Drop a pointless function
There is nothing to validate for boxed
parameters, so we don't need a validate
function for these.
gobject/gparamspecs.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
---
diff --git a/gobject/gparamspecs.c b/gobject/gparamspecs.c
index d4ad8c21af..c7879842b1 100644
--- a/gobject/gparamspecs.c
+++ b/gobject/gparamspecs.c
@@ -759,18 +759,6 @@ param_boxed_set_default (GParamSpec *pspec,
value->data[0].v_pointer = NULL;
}
-static gboolean
-param_boxed_validate (GParamSpec *pspec,
- GValue *value)
-{
- /* GParamSpecBoxed *bspec = G_PARAM_SPEC_BOXED (pspec); */
- guint changed = 0;
-
- /* can't do a whole lot here since we haven't even G_BOXED_TYPE() */
-
- return changed;
-}
-
static gint
param_boxed_values_cmp (GParamSpec *pspec,
const GValue *value1,
@@ -1508,7 +1496,7 @@ _g_param_spec_types_init (void)
G_TYPE_BOXED, /* value_type */
NULL, /* finalize */
param_boxed_set_default, /* value_set_default */
- param_boxed_validate, /* value_validate */
+ NULL, /* value_validate */
param_boxed_values_cmp, /* values_cmp */
};
type = g_param_type_register_static (g_intern_static_string ("GParamBoxed"), &pspec_info);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]