From 534855d42ecc5d073f02e9aec43c531304ea004a Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Fri, 2 Nov 2018 09:30:28 -0300 Subject: [PATCH] ges: Mark GValue in child property setters as const We can't change the vmethod at this point so just cast. This makes the API more explicit so it is better in all cases. --- ges/ges-timeline-element.c | 8 ++++---- ges/ges-timeline-element.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ges/ges-timeline-element.c b/ges/ges-timeline-element.c index bfa3889..1d12689 100644 --- a/ges/ges-timeline-element.c +++ b/ges/ges-timeline-element.c @@ -1387,7 +1387,7 @@ not_found: */ void ges_timeline_element_set_child_property_by_pspec (GESTimelineElement * self, - GParamSpec * pspec, GValue * value) + GParamSpec * pspec, const GValue * value) { ChildPropHandler *handler; GESTimelineElementClass *klass; @@ -1401,7 +1401,7 @@ ges_timeline_element_set_child_property_by_pspec (GESTimelineElement * self, klass = GES_TIMELINE_ELEMENT_GET_CLASS (self); g_assert (klass->set_child_property); - klass->set_child_property (self, handler->child, pspec, value); + klass->set_child_property (self, handler->child, pspec, (GValue *) value); return; @@ -1428,7 +1428,7 @@ not_found: */ gboolean ges_timeline_element_set_child_property (GESTimelineElement * self, - const gchar * property_name, GValue * value) + const gchar * property_name, const GValue * value) { GParamSpec *pspec; GESTimelineElementClass *klass; @@ -1441,7 +1441,7 @@ ges_timeline_element_set_child_property (GESTimelineElement * self, klass = GES_TIMELINE_ELEMENT_GET_CLASS (self); g_assert (klass->set_child_property); - klass->set_child_property (self, child, pspec, value); + klass->set_child_property (self, child, pspec, (GValue *) value); gst_object_unref (child); g_param_spec_unref (pspec); diff --git a/ges/ges-timeline-element.h b/ges/ges-timeline-element.h index 7786603..a371701 100644 --- a/ges/ges-timeline-element.h +++ b/ges/ges-timeline-element.h @@ -287,7 +287,7 @@ ges_timeline_element_set_child_property_valist (GESTimelineElement * self, GES_API void ges_timeline_element_set_child_property_by_pspec (GESTimelineElement * self, GParamSpec * pspec, - GValue * value); + const GValue * value); GES_API void ges_timeline_element_set_child_properties (GESTimelineElement * self, const gchar * first_property_name, @@ -296,7 +296,7 @@ void ges_timeline_element_set_child_properties (GESTimelineElement * self, GES_API gboolean ges_timeline_element_set_child_property (GESTimelineElement *self, const gchar *property_name, - GValue * value); + const GValue * value); GES_API gboolean ges_timeline_element_get_child_property (GESTimelineElement *self, -- 2.7.4