Cleanup: quiet conversion warning

This commit is contained in:
2022-09-09 12:17:59 +10:00
parent ce5ad66330
commit d455f1a0ba

View File

@@ -85,10 +85,11 @@ inline void ObjectInfos::sync(const blender::draw::ObjectRef ref, bool is_active
if (ref.dupli_object == nullptr) {
/* TODO(fclem): this is rather costly to do at draw time. Maybe we can
* put it in ob->runtime and make depsgraph ensure it is up to date. */
random = BLI_hash_int_2d(BLI_hash_string(ref.object->id.name + 2), 0) * (1.0f / 0xFFFFFFFF);
random = BLI_hash_int_2d(BLI_hash_string(ref.object->id.name + 2), 0) *
(1.0f / (float)0xFFFFFFFF);
}
else {
random = ref.dupli_object->random_id * (1.0f / 0xFFFFFFFF);
random = ref.dupli_object->random_id * (1.0f / (float)0xFFFFFFFF);
}
/* Default values. Set if needed. */
random = 0.0f;