diff options
author | Alexander Romanov <a.romanov@blend4web.com> | 2017-07-03 19:49:35 +0300 |
---|---|---|
committer | Alexander Romanov <a.romanov@blend4web.com> | 2017-07-03 19:53:00 +0300 |
commit | e1482841dd5dd55cb453d37d115ec80f44c02316 (patch) | |
tree | 63cee90e2ab7b4316b4e36ffeb181700e99d6aab /tests | |
parent | 1ad0cc6bde4746949eee7a9babb97178a05816c3 (diff) | |
parent | 1fb30758034c2f83862bb7fc5f30a1a4d7b4510b (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gtests/blenlib/BLI_kdopbvh_test.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/gtests/blenlib/BLI_kdopbvh_test.cc b/tests/gtests/blenlib/BLI_kdopbvh_test.cc index bc8cf58d69d..e713ddc1695 100644 --- a/tests/gtests/blenlib/BLI_kdopbvh_test.cc +++ b/tests/gtests/blenlib/BLI_kdopbvh_test.cc @@ -58,7 +58,10 @@ static void find_nearest_points_test(int points_len, float scale, int round, int { struct RNG *rng = BLI_rng_new(random_seed); BVHTree *tree = BLI_bvhtree_new(points_len, 0.0, 8, 8); - float (*points)[3] = (float (*)[3])MEM_mallocN(sizeof(float[3]) * points_len, __func__); + + void *mem = MEM_mallocN(sizeof(float[3]) * points_len, __func__); + float (*points)[3] = (float (*)[3])mem; + for (int i = 0; i < points_len; i++) { rng_v3_round(points[i], 3, rng, round, scale); BLI_bvhtree_insert(tree, i, points[i], 1); |