gstvalue: Minor optimization for checks
authorEdward Hervey <edward@centricular.com>
Fri, 1 May 2020 12:45:28 +0000 (14:45 +0200)
committerSebastian Dröge <slomo@coaxion.net>
Tue, 5 May 2020 10:17:49 +0000 (10:17 +0000)
commitf800559789a0f4194b4ee58f809091b390c63ebd
tree1d765d3825af31a81f27c17a3c179a22a333c1b4
parentdc7efe296da907b6308791125003a7df02d4fc26
gstvalue: Minor optimization for checks

For value types that aren't subclassable, just check the type directly.
For flags, compare against the fundamental type directly instead of going through
the more expensive recursive check of `G_TYPE_CHECK_VALUE_TYPE()`

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/453>
gst/gstvalue.c
gst/gstvalue.h