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.
This commit is contained in:
Stefan Kost 2009-11-16 13:49:32 +02:00
parent 7a8fa2b6a0
commit 7bd9299f3e

View file

@ -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;