aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ephy-node-db.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ephy-node-db.c')
-rw-r--r--lib/ephy-node-db.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/ephy-node-db.c b/lib/ephy-node-db.c
index 0eaf92755..27e27073b 100644
--- a/lib/ephy-node-db.c
+++ b/lib/ephy-node-db.c
@@ -67,10 +67,12 @@ static GObjectClass *parent_class = NULL;
GType
ephy_node_db_get_type (void)
{
- static GType ephy_node_db_type = 0;
+ static GType type = 0;
- if (ephy_node_db_type == 0) {
- static const GTypeInfo our_info = {
+ if (G_UNLIKELY (type == 0))
+ {
+ static const GTypeInfo our_info =
+ {
sizeof (EphyNodeDbClass),
NULL,
NULL,
@@ -82,12 +84,12 @@ ephy_node_db_get_type (void)
(GInstanceInitFunc) ephy_node_db_init
};
- ephy_node_db_type = g_type_register_static (G_TYPE_OBJECT,
- "EphyNodeDb",
- &our_info, 0);
+ type = g_type_register_static (G_TYPE_OBJECT,
+ "EphyNodeDb",
+ &our_info, 0);
}
- return ephy_node_db_type;
+ return type;
}
static void