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:
Diffstat (limited to 'intern/cycles/scene/hair.cpp')
-rw-r--r--intern/cycles/scene/hair.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/scene/hair.cpp b/intern/cycles/scene/hair.cpp
index 0fd9c70cc26..2951a609ae9 100644
--- a/intern/cycles/scene/hair.cpp
+++ b/intern/cycles/scene/hair.cpp
@@ -119,7 +119,7 @@ void Hair::Curve::motion_keys(const float3 *curve_keys,
{
/* Figure out which steps we need to fetch and their interpolation factor. */
const size_t max_step = num_steps - 1;
- const size_t step = std::min((size_t)(time * max_step), max_step - 1);
+ const size_t step = min((int)(time * max_step), max_step - 1);
const float t = time * max_step - step;
/* Fetch vertex coordinates. */
float4 curr_keys[2];
@@ -147,7 +147,7 @@ void Hair::Curve::cardinal_motion_keys(const float3 *curve_keys,
{
/* Figure out which steps we need to fetch and their interpolation factor. */
const size_t max_step = num_steps - 1;
- const size_t step = min((size_t)(time * max_step), max_step - 1);
+ const size_t step = min((int)(time * max_step), max_step - 1);
const float t = time * max_step - step;
/* Fetch vertex coordinates. */
float4 curr_keys[4];
@@ -192,7 +192,7 @@ void Hair::Curve::keys_for_step(const float3 *curve_keys,
float4 r_keys[2]) const
{
k0 = max(k0, 0);
- k1 = min(k1, (size_t)(num_keys - 1));
+ k1 = min(k1, num_keys - 1);
const size_t center_step = ((num_steps - 1) / 2);
if (step == center_step) {
/* Center step: regular key location. */
@@ -238,7 +238,7 @@ void Hair::Curve::cardinal_keys_for_step(const float3 *curve_keys,
float4 r_keys[4]) const
{
k0 = max(k0, 0);
- k3 = min(k3, (size_t)(num_keys - 1));
+ k3 = min(k3, num_keys - 1);
const size_t center_step = ((num_steps - 1) / 2);
if (step == center_step) {
/* Center step: regular key location. */