Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-08-07 19:24:59 +0300
committerJacques Lucke <jacques@blender.org>2020-08-07 19:42:21 +0300
commitc50e5fcc344d00b03eb4a3141b5b45944c3570fd (patch)
treef683ae1a1f38551d160a5be2ee86561d51faca26 /source/blender/blenlib/BLI_rand.hh
parent28b10224346a9a2e55267f98357991a841eeda5b (diff)
Cleanup: use C++ style casts in various places
Diffstat (limited to 'source/blender/blenlib/BLI_rand.hh')
-rw-r--r--source/blender/blenlib/BLI_rand.hh6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenlib/BLI_rand.hh b/source/blender/blenlib/BLI_rand.hh
index b3c9c376141..1b321bd7bcd 100644
--- a/source/blender/blenlib/BLI_rand.hh
+++ b/source/blender/blenlib/BLI_rand.hh
@@ -44,7 +44,7 @@ class RandomNumberGenerator {
void seed(uint32_t seed)
{
constexpr uint64_t lowseed = 0x330E;
- x_ = (((uint64_t)seed) << 16) | lowseed;
+ x_ = (static_cast<uint64_t>(seed) << 16) | lowseed;
}
void seed_random(uint32_t seed);
@@ -52,13 +52,13 @@ class RandomNumberGenerator {
uint32_t get_uint32()
{
this->step();
- return (uint32_t)(x_ >> 17);
+ return static_cast<uint32_t>(x_ >> 17);
}
int32_t get_int32()
{
this->step();
- return (int32_t)(x_ >> 17);
+ return static_cast<int32_t>(x_ >> 17);
}
/**