diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-03-15 13:51:02 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-03-15 13:51:02 +0300 |
commit | 37419bb3f688caca9c292d7c3d5680eb5594bd98 (patch) | |
tree | 7fb108afd38ca8561a5444808efd3a19defe105e /source | |
parent | 4be4c06671551da62edf197df6e7ad8c89dc2fe0 (diff) |
Cleanup: avoid setting float values by bit-pattern
Replace memset with copy_vn_fl, note that the exact values are slightly
different in this case. The value being set was close to FLT_MAX.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/fluid.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c index 934dc47cf81..56dc671a909 100644 --- a/source/blender/blenkernel/intern/fluid.c +++ b/source/blender/blenkernel/intern/fluid.c @@ -705,8 +705,7 @@ static void bb_allocateData(FluidObjectBB *bb, bool use_velocity, bool use_influ } bb->distances = MEM_malloc_arrayN(bb->total_cells, sizeof(float), "fluid_bb_distances"); - /* Initialize to infinity. */ - memset(bb->distances, 0x7f7f7f7f, sizeof(float) * bb->total_cells); + copy_vn_fl(bb->distances, bb->total_cells, FLT_MAX); bb->valid = true; } |