diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-25 11:30:50 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-25 11:31:10 +0300 |
commit | c7b247a118e302a3afc6473797e53b6af28b69e2 (patch) | |
tree | d11149a165bfd8f3b3b791f24547499f041b133b /source/blender/blenkernel/intern/volume_render.cc | |
parent | 891949cbb47143420f4324cb60efc05ef5d70b39 (diff) |
Cleanup: replace static_casts with functional casts for numeric types
Diffstat (limited to 'source/blender/blenkernel/intern/volume_render.cc')
-rw-r--r-- | source/blender/blenkernel/intern/volume_render.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/volume_render.cc b/source/blender/blenkernel/intern/volume_render.cc index e7620be6401..700bd63c9d4 100644 --- a/source/blender/blenkernel/intern/volume_render.cc +++ b/source/blender/blenkernel/intern/volume_render.cc @@ -102,9 +102,8 @@ bool BKE_volume_grid_dense_floats(const Volume *volume, } const openvdb::Vec3i resolution = bbox.dim().asVec3i(); - const int64_t num_voxels = static_cast<int64_t>(resolution[0]) * - static_cast<int64_t>(resolution[1]) * - static_cast<int64_t>(resolution[2]); + const int64_t num_voxels = int64_t(resolution[0]) * int64_t(resolution[1]) * + int64_t(resolution[2]); const int channels = BKE_volume_grid_channels(volume_grid); const int elem_size = sizeof(float) * channels; float *voxels = static_cast<float *>(MEM_malloc_arrayN(num_voxels, elem_size, __func__)); |