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_float3.hh
parent28b10224346a9a2e55267f98357991a841eeda5b (diff)
Cleanup: use C++ style casts in various places
Diffstat (limited to 'source/blender/blenlib/BLI_float3.hh')
-rw-r--r--source/blender/blenlib/BLI_float3.hh8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenlib/BLI_float3.hh b/source/blender/blenlib/BLI_float3.hh
index a976e909738..2d90498fee8 100644
--- a/source/blender/blenlib/BLI_float3.hh
+++ b/source/blender/blenlib/BLI_float3.hh
@@ -31,7 +31,7 @@ struct float3 {
{
}
- float3(const float (*ptr)[3]) : float3((const float *)ptr)
+ float3(const float (*ptr)[3]) : float3(static_cast<const float *>(ptr[0]))
{
}
@@ -204,9 +204,9 @@ struct float3 {
uint64_t hash() const
{
- uint64_t x1 = *(uint32_t *)&x;
- uint64_t x2 = *(uint32_t *)&y;
- uint64_t x3 = *(uint32_t *)&z;
+ uint64_t x1 = *reinterpret_cast<const uint32_t *>(&x);
+ uint64_t x2 = *reinterpret_cast<const uint32_t *>(&y);
+ uint64_t x3 = *reinterpret_cast<const uint32_t *>(&z);
return (x1 * 435109) ^ (x2 * 380867) ^ (x3 * 1059217);
}