diff options
author | Sergey Sharybin <sergey@blender.org> | 2022-02-09 18:15:56 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-02-09 18:16:21 +0300 |
commit | c69ee218d786e6ae24804b00e7a7856c7638f7b0 (patch) | |
tree | 5c35fcc7114bf1d7c0f99a9740559d352baf3f6c /intern/cycles/scene/hair.cpp | |
parent | 7313a84c5acb401817f1c44cfd8bf22428f34424 (diff) |
Revert "Fix size_t -> int -> size_t round trip in Cycles"
This reverts commit d74bb7be1916744ae56347b49333eac22ebb7339.
Need to re-iterate to have a proper support of all platforms.
Diffstat (limited to 'intern/cycles/scene/hair.cpp')
-rw-r--r-- | intern/cycles/scene/hair.cpp | 8 |
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. */ |