mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-23 10:42:11 +01:00
gvariant: Remove some unnecessary type assertions on a hot path
While checking the validity of a `GVariantTypeInfo` is good, this code path is very hot, and I’ve never seen these assertions catch a bug in practice. Lean more towards the performance side of the performance/correctness tradeoff in this case, by removing the assertions here. They remain in place in a number of other `GVariantTypeInfo` code paths, so invalid `GVariantTypeInfo` pointers should hopefully still be caught quickly. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
8373f328bd
commit
ab8cdb07de
@ -247,8 +247,6 @@ g_variant_type_info_query (GVariantTypeInfo *info,
|
||||
guint *alignment,
|
||||
gsize *fixed_size)
|
||||
{
|
||||
g_variant_type_info_check (info, 0);
|
||||
|
||||
if (alignment)
|
||||
*alignment = info->alignment;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user