diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-08-20 12:22:09 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-08-20 12:37:14 +0300 |
commit | 3ec9ff16f888cc30b5fe728953a8368d0a2c0275 (patch) | |
tree | 1d474ddbf3c70eea0c0f15246abdb37d3ae9a8ff /source/blender | |
parent | 179a2e1b98b048e5b9f607eee23f94f22d8234aa (diff) |
Resolve MSVC/OpenMP compat issue
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/editmesh_bvh.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/BLI_kdopbvh.h | 4 | ||||
-rw-r--r-- | source/blender/blenlib/intern/BLI_kdopbvh.c | 12 | ||||
-rw-r--r-- | source/blender/python/mathutils/mathutils_bvhtree.c | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/editmesh_bvh.c b/source/blender/blenkernel/intern/editmesh_bvh.c index f46e158f833..0e619f28622 100644 --- a/source/blender/blenkernel/intern/editmesh_bvh.c +++ b/source/blender/blenkernel/intern/editmesh_bvh.c @@ -442,7 +442,7 @@ struct BMBVHTree_OverlapData { float epsilon; }; -static bool bmbvh_overlap_cb(void *userdata, int index_a, int index_b, unsigned int UNUSED(thread)) +static bool bmbvh_overlap_cb(void *userdata, int index_a, int index_b, int UNUSED(thread)) { struct BMBVHTree_OverlapData *data = userdata; const BMBVHTree *bmtree_a = data->tree_pair[0]; diff --git a/source/blender/blenlib/BLI_kdopbvh.h b/source/blender/blenlib/BLI_kdopbvh.h index 6fc93ca9cdb..ce7f3ab25fe 100644 --- a/source/blender/blenlib/BLI_kdopbvh.h +++ b/source/blender/blenlib/BLI_kdopbvh.h @@ -75,7 +75,7 @@ typedef void (*BVHTree_NearestPointCallback)(void *userdata, int index, const fl typedef void (*BVHTree_RayCastCallback)(void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit); /* callback to check if 2 nodes overlap (use thread if intersection results need to be stored) */ -typedef bool (*BVHTree_OverlapCallback)(void *userdata, int index_a, int index_b, unsigned int thread); +typedef bool (*BVHTree_OverlapCallback)(void *userdata, int index_a, int index_b, int thread); /* callback to range search query */ typedef void (*BVHTree_RangeQuery)(void *userdata, int index, float dist_sq); @@ -91,7 +91,7 @@ void BLI_bvhtree_balance(BVHTree *tree); bool BLI_bvhtree_update_node(BVHTree *tree, int index, const float co[3], const float co_moving[3], int numpoints); void BLI_bvhtree_update_tree(BVHTree *tree); -unsigned int BLI_bvhtree_overlap_thread_num(const BVHTree *tree); +int BLI_bvhtree_overlap_thread_num(const BVHTree *tree); /* collision/overlap: check two trees if they overlap, alloc's *overlap with length of the int return value */ BVHTreeOverlap *BLI_bvhtree_overlap( diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index 81d23a0692d..d6d0443893e 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -117,7 +117,7 @@ typedef struct BVHOverlapData_Thread { BVHOverlapData_Shared *shared; struct BLI_Stack *overlap; /* store BVHTreeOverlap */ /* use for callbacks */ - unsigned int thread; + int thread; } BVHOverlapData_Thread; typedef struct BVHNearestData { @@ -1163,9 +1163,9 @@ static void tree_overlap_traverse_cb( * * \warning Must be the first tree passed to #BLI_bvhtree_overlap! */ -unsigned int BLI_bvhtree_overlap_thread_num(const BVHTree *tree) +int BLI_bvhtree_overlap_thread_num(const BVHTree *tree) { - return (unsigned int)MIN2(tree->tree_type, tree->nodes[tree->totleaf]->totnode); + return (int)MIN2(tree->tree_type, tree->nodes[tree->totleaf]->totnode); } BVHTreeOverlap *BLI_bvhtree_overlap( @@ -1173,12 +1173,12 @@ BVHTreeOverlap *BLI_bvhtree_overlap( /* optional callback to test the overlap before adding (must be thread-safe!) */ BVHTree_OverlapCallback callback, void *userdata) { - const unsigned int thread_num = BLI_bvhtree_overlap_thread_num(tree1); - unsigned int j; + const int thread_num = BLI_bvhtree_overlap_thread_num(tree1); + int j; size_t total = 0; BVHTreeOverlap *overlap = NULL, *to = NULL; BVHOverlapData_Shared data_shared; - BVHOverlapData_Thread *data = BLI_array_alloca(data, thread_num); + BVHOverlapData_Thread *data = BLI_array_alloca(data, (size_t)thread_num); axis_t start_axis, stop_axis; /* check for compatibility of both trees (can't compare 14-DOP with 18-DOP) */ diff --git a/source/blender/python/mathutils/mathutils_bvhtree.c b/source/blender/python/mathutils/mathutils_bvhtree.c index a3b1d6d3e30..506b64709e3 100644 --- a/source/blender/python/mathutils/mathutils_bvhtree.c +++ b/source/blender/python/mathutils/mathutils_bvhtree.c @@ -451,7 +451,7 @@ struct PyBVHTree_OverlapData { float epsilon; }; -static bool py_bvhtree_overlap_cb(void *userdata, int index_a, int index_b, unsigned int UNUSED(thread)) +static bool py_bvhtree_overlap_cb(void *userdata, int index_a, int index_b, int UNUSED(thread)) { struct PyBVHTree_OverlapData *data = userdata; PyBVHTree *tree_a = data->tree_pair[0]; |