From 7bd9299f3ea310f6b43be8c8f25fc0e005682c43 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Mon, 16 Nov 2009 13:49:32 +0200 Subject: [PATCH] structure: don't check enum types twice. G_VALUE_HOLDS_ENUM(value) is defined as G_TYPE_CHECK_VALUE_TYPE (value, G_TYPE_ENUM). Just check for the right enum-type right away. --- gst/gststructure.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/gst/gststructure.c b/gst/gststructure.c index 3c6704fe54..051c54164d 100644 --- a/gst/gststructure.c +++ b/gst/gststructure.c @@ -1448,8 +1448,6 @@ gst_structure_get_enum (const GstStructure * structure, if (field == NULL) return FALSE; - if (!G_VALUE_HOLDS_ENUM (&field->value)) - return FALSE; if (!G_TYPE_CHECK_VALUE_TYPE (&field->value, enumtype)) return FALSE;