From 3bf7e221ad480aee1ad78ec15eec29f9f210cb26 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Mon, 20 Mar 2006 16:45:15 +0000 Subject: [PATCH] gst/gstutils.h: Add G_UNLIKELY to our boilerplate to optimise the 'already registered the type' case. (Closes: #33519... Original commit message from CVS: * gst/gstutils.h: Add G_UNLIKELY to our boilerplate to optimise the 'already registered the type' case. (Closes: #335195 for now). In the future, when we depend on GLib 2.10, we could also intern the type name using g_intern_static_string() --- ChangeLog | 8 ++++++++ gst/gstutils.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 078043a611..0de88cf0ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-03-20 Jan Schmidt + + * gst/gstutils.h: + Add G_UNLIKELY to our boilerplate to optimise the 'already registered + the type' case. (Closes: #335195 for now). In the future, when we + depend on GLib 2.10, we could also intern the type name using + g_intern_static_string() + 2006-03-20 Wim Taymans * gst/gstbin.c: (gst_bin_handle_message_func), diff --git a/gst/gstutils.h b/gst/gstutils.h index ca3ab2ec2d..0844ce769e 100644 --- a/gst/gstutils.h +++ b/gst/gstutils.h @@ -116,7 +116,7 @@ GType \ type_as_function ## _get_type (void) \ { \ static GType object_type = 0; \ - if (object_type == 0) { \ + if (G_UNLIKELY (object_type == 0)) { \ static const GTypeInfo object_info = { \ sizeof (type ## Class), \ type_as_function ## _base_init, \