gstvalue: Use previous assumption
authorEdward Hervey <edward@centricular.com>
Fri, 1 May 2020 12:50:52 +0000 (14:50 +0200)
committerSebastian Dröge <slomo@coaxion.net>
Tue, 5 May 2020 10:17:49 +0000 (10:17 +0000)
The types were already checked for equality just before, not need to
check for that again

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/453>

gst/gstvalue.c

index 49ad8f4..fba5729 100644 (file)
@@ -6042,15 +6042,13 @@ gst_value_can_intersect (const GValue * value1, const GValue * value2)
 
   if (G_UNLIKELY (GST_VALUE_HOLDS_FLAG_SET (value1) &&
           GST_VALUE_HOLDS_FLAG_SET (value2))) {
-    GType type1, type2, flagset_type;
+    GType flagset_type;
 
-    type1 = G_VALUE_TYPE (value1);
-    type2 = G_VALUE_TYPE (value2);
     flagset_type = GST_TYPE_FLAG_SET;
 
     /* Allow intersection with the generic FlagSet type, on one
      * side, but not 2 different subtypes - that makes no sense */
-    if (type1 == type2 || type1 == flagset_type || type2 == flagset_type)
+    if (type1 == flagset_type || type2 == flagset_type)
       return TRUE;
   }