diff options
author | Philip Withnall <pwithnall@endlessos.org> | 2022-12-29 18:54:53 +0000 |
---|---|---|
committer | Philip Withnall <pwithnall@endlessos.org> | 2023-01-18 12:15:47 +0000 |
commit | ab8cdb07dece52f0226a1d0346157b6f172ed1ba (patch) | |
tree | 229bd577a5662761f8f19499dedfdfb805683178 | |
parent | 8373f328bd1e996a1521eed3f962af873cfa14a0 (diff) | |
download | glib-ab8cdb07dece52f0226a1d0346157b6f172ed1ba.tar.gz |
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>
-rw-r--r-- | glib/gvarianttypeinfo.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/glib/gvarianttypeinfo.c b/glib/gvarianttypeinfo.c index 2b310581c..4e2e9c5b4 100644 --- a/glib/gvarianttypeinfo.c +++ b/glib/gvarianttypeinfo.c @@ -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; |