From dd6410b2b35a76de75622660cae9c1444b7a1880 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Mon, 21 Nov 2016 23:12:07 +0100 Subject: optimized QRegisterTable cleanup * we can use root() instead of min() which is faster --- src/rbtree.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/rbtree.h') diff --git a/src/rbtree.h b/src/rbtree.h index db0d430..131ba81 100644 --- a/src/rbtree.h +++ b/src/rbtree.h @@ -80,9 +80,14 @@ public: * means we can avoid declaring EBEntry implementations * virtual. */ - g_assert(min() == NULL); + g_assert(root() == NULL); } + inline RBEntryType * + root(void) + { + return (RBEntryType *)RB_ROOT(&head); + } inline RBEntryType * insert(RBEntryType *entry) { -- cgit v1.2.3