summaryrefslogtreecommitdiff
path: root/src/modules/ray/ray_object_type.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2017-09-13 18:04:31 -0700
committerVito Caputo <vcaputo@pengaru.com>2017-09-14 14:27:52 -0700
commit445e9481bbe598d1eabcae7a70534c51a52c6de5 (patch)
treecbc7156b0775a8b00ed92714f20aa882a7bfd51a /src/modules/ray/ray_object_type.h
parent121846b0e35607bf8b48d5ce304a65e2657be455 (diff)
ray: simplify object iterators using sentinel type
Trivial optimization eliminates some instructions from the hot path, no need to maintain a separate index from the current object pointer.
Diffstat (limited to 'src/modules/ray/ray_object_type.h')
-rw-r--r--src/modules/ray/ray_object_type.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/modules/ray/ray_object_type.h b/src/modules/ray/ray_object_type.h
index 6ce20f5..ab797d2 100644
--- a/src/modules/ray/ray_object_type.h
+++ b/src/modules/ray/ray_object_type.h
@@ -2,6 +2,7 @@
#define _RAY_OBJECT_TYPE_H
typedef enum ray_object_type_t {
+ RAY_OBJECT_TYPE_SENTINEL,
RAY_OBJECT_TYPE_SPHERE,
RAY_OBJECT_TYPE_POINT,
RAY_OBJECT_TYPE_PLANE,
© All Rights Reserved