Fixed build error on Windows / VS2015

This commit is contained in:
Sybren A. Stüvel 2017-07-03 15:50:19 +02:00
parent 0900914d96
commit 1fb3075803
1 changed files with 4 additions and 1 deletions

View File

@ -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);