diff options
author | Tavian Barnes <tavianator@gmail.com> | 2010-08-01 14:55:47 -0600 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2010-08-01 14:55:47 -0600 |
commit | 35c72fa8f2ccfd934e54185763c2c207963e1c57 (patch) | |
tree | aa71852e077f08e4931ebe967a5e3af78861083a /libdimension/prtree.c | |
parent | 52148d309a9588f5c3a14695133d6a6182c1b8d0 (diff) | |
download | dimension-35c72fa8f2ccfd934e54185763c2c207963e1c57.tar.xz |
Optimize PR-tree construction a bit.
Diffstat (limited to 'libdimension/prtree.c')
-rw-r--r-- | libdimension/prtree.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/libdimension/prtree.c b/libdimension/prtree.c index a7a2c26..95f0eaa 100644 --- a/libdimension/prtree.c +++ b/libdimension/prtree.c @@ -73,19 +73,17 @@ enum { DMNSN_ZMAX }; -static double +static inline double dmnsn_priority_get(dmnsn_list_iterator *i, bool is_object, int comparator) { dmnsn_bounding_box box; if (is_object) { - dmnsn_object *object; - dmnsn_list_get(i, &object); - box = object->bounding_box; + dmnsn_object **object = dmnsn_list_at(i); + box = (*object)->bounding_box; } else { - dmnsn_prtree_node *prnode; - dmnsn_list_get(i, &prnode); - box = prnode->bounding_box; + dmnsn_prtree_node **prnode = dmnsn_list_at(i); + box = (*prnode)->bounding_box; } switch (comparator) { |