diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-20 19:07:57 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-20 19:07:57 +0400 |
commit | 49c61e169bb4114b63d99d842c27d533b8733f82 (patch) | |
tree | 2e57f7c064f31e5222ae1dbb8a6e2b1579bd7270 /source/blender/blenlib/intern/BLI_kdopbvh.c | |
parent | 8ff67f12c79819cc06bb803ef79e7c97f73f2ef1 (diff) |
misc edits
- fix for missing None check with recent 'Hidden Wire' draw option.
- avoid int overflow with mesh selection.
- remove ';' outside of functions.
Diffstat (limited to 'source/blender/blenlib/intern/BLI_kdopbvh.c')
-rw-r--r-- | source/blender/blenlib/intern/BLI_kdopbvh.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index cd5c961d982..a4c72aa26b0 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -72,7 +72,7 @@ struct BVHTree { /* optimization, ensure we stay small */ BLI_STATIC_ASSERT((sizeof(void *) == 8 && sizeof(BVHTree) <= 48) || (sizeof(void *) == 4 && sizeof(BVHTree) <= 32), - "over sized"); + "over sized") typedef struct BVHOverlapData { BVHTree *tree1, *tree2; @@ -603,6 +603,7 @@ static void build_implicit_tree_helper(BVHTree *tree, BVHBuildHelper *data) data->branches_on_level[0] = 1; /* We could stop the loop first (but I am lazy to find out when) */ + /* note: this often causes integer overflow, may be worth avoiding? - campbell */ for (depth = 1; depth < 32; depth++) { data->branches_on_level[depth] = data->branches_on_level[depth - 1] * data->tree_type; data->leafs_per_child[depth] = data->leafs_per_child[depth - 1] / data->tree_type; |