[Bf-blender-cvs] [f9d138be51e] master: Cleanup: compiler warning

Brecht Van Lommel noreply at git.blender.org
Mon Jun 22 13:28:14 CEST 2020


Commit: f9d138be51e6f28b4796ac3959c6ff2ed6c5d1c7
Author: Brecht Van Lommel
Date:   Mon Jun 22 12:32:34 2020 +0200
Branches: master
https://developer.blender.org/rBf9d138be51e6f28b4796ac3959c6ff2ed6c5d1c7

Cleanup: compiler warning

===================================================================

M	source/blender/python/mathutils/mathutils_noise.c

===================================================================

diff --git a/source/blender/python/mathutils/mathutils_noise.c b/source/blender/python/mathutils/mathutils_noise.c
index 8ec0c9ce44a..eece782f6d0 100644
--- a/source/blender/python/mathutils/mathutils_noise.c
+++ b/source/blender/python/mathutils/mathutils_noise.c
@@ -121,7 +121,7 @@ static void init_genrand(ulong s)
     const float range = 32; /* range in both pos/neg direction */
     for (j = 0; j < ARRAY_SIZE(state_offset_vector); j++, state_offset++) {
       /* overflow is fine here */
-      state_offset_vector[j] = (float)(int)(*state_offset) * (1.0f / (INT_MAX / range));
+      state_offset_vector[j] = (float)(int)(*state_offset) * (1.0f / ((float)INT_MAX / range));
     }
   }
 }



More information about the Bf-blender-cvs mailing list