diff options
author | Jacques Lucke <jacques@blender.org> | 2020-08-07 19:24:59 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-08-07 19:42:21 +0300 |
commit | c50e5fcc344d00b03eb4a3141b5b45944c3570fd (patch) | |
tree | f683ae1a1f38551d160a5be2ee86561d51faca26 /source/blender/blenlib/intern | |
parent | 28b10224346a9a2e55267f98357991a841eeda5b (diff) |
Cleanup: use C++ style casts in various places
Diffstat (limited to 'source/blender/blenlib/intern')
-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 9bafc422db5..224db31471d 100644 --- a/source/blender/blenlib/intern/rand.cc +++ b/source/blender/blenlib/intern/rand.cc @@ -93,7 +93,7 @@ void BLI_rng_srandom(RNG *rng, unsigned int seed) void BLI_rng_get_char_n(RNG *rng, char *bytes, size_t bytes_len) { - rng->rng.get_bytes(blender::MutableSpan(bytes, (int64_t)bytes_len)); + rng->rng.get_bytes(blender::MutableSpan(bytes, static_cast<int64_t>(bytes_len))); } int BLI_rng_get_int(RNG *rng) @@ -428,7 +428,7 @@ float2 RandomNumberGenerator::get_triangle_sample(float2 v1, float2 v2, float2 v void RandomNumberGenerator::get_bytes(MutableSpan<char> r_bytes) { constexpr int64_t mask_bytes = 2; - constexpr int64_t rand_stride = (int64_t)sizeof(x_) - mask_bytes; + constexpr int64_t rand_stride = static_cast<int64_t>(sizeof(x_)) - mask_bytes; int64_t last_len = 0; int64_t trim_len = r_bytes.size(); |