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/blenlib/intern/rand.cc | |
parent | 891949cbb47143420f4324cb60efc05ef5d70b39 (diff) |
Cleanup: replace static_casts with functional casts for numeric types
Diffstat (limited to 'source/blender/blenlib/intern/rand.cc')
-rw-r--r-- | source/blender/blenlib/intern/rand.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/rand.cc b/source/blender/blenlib/intern/rand.cc index 40bbe14101b..b5db0d6b473 100644 --- a/source/blender/blenlib/intern/rand.cc +++ b/source/blender/blenlib/intern/rand.cc @@ -72,7 +72,7 @@ void BLI_rng_srandom(RNG *rng, uint seed) void BLI_rng_get_char_n(RNG *rng, char *bytes, size_t bytes_len) { - rng->rng.get_bytes(blender::MutableSpan(bytes, static_cast<int64_t>(bytes_len))); + rng->rng.get_bytes(blender::MutableSpan(bytes, int64_t(bytes_len))); } int BLI_rng_get_int(RNG *rng) @@ -441,7 +441,7 @@ float3 RandomNumberGenerator::get_triangle_sample_3d(float3 v1, float3 v2, float void RandomNumberGenerator::get_bytes(MutableSpan<char> r_bytes) { constexpr int64_t mask_bytes = 2; - constexpr int64_t rand_stride = static_cast<int64_t>(sizeof(x_)) - mask_bytes; + constexpr int64_t rand_stride = int64_t(sizeof(x_)) - mask_bytes; int64_t last_len = 0; int64_t trim_len = r_bytes.size(); |