diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-12-17 10:04:35 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-12-17 10:04:35 +0300 |
commit | 7788293954de1d8ceef3152e23e56a82050f0585 (patch) | |
tree | 533d2ec1309b362d9d52ac21e7e3256bd65cf493 /source | |
parent | 0e1bb232e68ce71f4c3dd331ed6331665238a065 (diff) |
Cleanup: Silenced unused var warnings.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/imbuf/intern/transform.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/imbuf/intern/transform.cc b/source/blender/imbuf/intern/transform.cc index 3e071a9e4d7..e1c451a8412 100644 --- a/source/blender/imbuf/intern/transform.cc +++ b/source/blender/imbuf/intern/transform.cc @@ -305,19 +305,22 @@ class Sampler { void sample(const ImBuf *source, const float u, const float v, SampleType &r_sample) { - const float wrapped_u = uv_wrapper.modify_u(source, u); - const float wrapped_v = uv_wrapper.modify_v(source, v); - if constexpr (Filter == IMB_FILTER_BILINEAR && std::is_same_v<StorageType, float> && NumChannels == 4) { + const float wrapped_u = uv_wrapper.modify_u(source, u); + const float wrapped_v = uv_wrapper.modify_v(source, v); bilinear_interpolation_color_fl(source, nullptr, &r_sample[0], wrapped_u, wrapped_v); } else if constexpr (Filter == IMB_FILTER_NEAREST && std::is_same_v<StorageType, unsigned char> && NumChannels == 4) { + const float wrapped_u = uv_wrapper.modify_u(source, u); + const float wrapped_v = uv_wrapper.modify_v(source, v); nearest_interpolation_color_char(source, &r_sample[0], nullptr, wrapped_u, wrapped_v); } else if constexpr (Filter == IMB_FILTER_BILINEAR && std::is_same_v<StorageType, unsigned char> && NumChannels == 4) { + const float wrapped_u = uv_wrapper.modify_u(source, u); + const float wrapped_v = uv_wrapper.modify_v(source, v); bilinear_interpolation_color_char(source, &r_sample[0], nullptr, wrapped_u, wrapped_v); } else if constexpr (Filter == IMB_FILTER_BILINEAR && std::is_same_v<StorageType, float>) { @@ -326,6 +329,8 @@ class Sampler { source->rect_float, &r_sample[0], source->x, source->y, NumChannels, u, v, true, true); } else { + const float wrapped_u = uv_wrapper.modify_u(source, u); + const float wrapped_v = uv_wrapper.modify_v(source, v); BLI_bilinear_interpolation_fl(source->rect_float, &r_sample[0], source->x, @@ -336,6 +341,8 @@ class Sampler { } } else if constexpr (Filter == IMB_FILTER_NEAREST && std::is_same_v<StorageType, float>) { + const float wrapped_u = uv_wrapper.modify_u(source, u); + const float wrapped_v = uv_wrapper.modify_v(source, v); sample_nearest_float(source, wrapped_u, wrapped_v, r_sample); } else { |