aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/rbtree.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2016-11-21 23:12:07 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2016-11-22 18:15:21 +0100
commitdd6410b2b35a76de75622660cae9c1444b7a1880 (patch)
tree7cd2ceec58a4a8012fa86a18cb8c81146a8711ee /src/rbtree.h
parent20fcf2feccbe2c48ee33cee73ed8bf9a6d4a06a2 (diff)
optimized QRegisterTable cleanup
* we can use root() instead of min() which is faster
Diffstat (limited to 'src/rbtree.h')
-rw-r--r--src/rbtree.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rbtree.h b/src/rbtree.h
index db0d430..131ba81 100644
--- a/src/rbtree.h
+++ b/src/rbtree.h
@@ -80,10 +80,15 @@ 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)
{
RB_INSERT(Tree, &head, entry);