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:
authorJeroen Bakker <jeroen@blender.org>2021-03-30 15:12:41 +0300
committerJeroen Bakker <jeroen@blender.org>2021-03-30 17:03:43 +0300
commit88e0ed32888f4a87ec1192e3b54aebe8686e029c (patch)
tree2659678f6a9adfd6605c7fb17b219b9166364ade /source/blender/compositor/operations/COM_SunBeamsOperation.cc
parentb48a573adb1e8ba254c5b3ea58bf1bb2a013ce89 (diff)
Cleanup: Use constexpr.
Diffstat (limited to 'source/blender/compositor/operations/COM_SunBeamsOperation.cc')
-rw-r--r--source/blender/compositor/operations/COM_SunBeamsOperation.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/compositor/operations/COM_SunBeamsOperation.cc b/source/blender/compositor/operations/COM_SunBeamsOperation.cc
index 085a0bb571c..46fc716b2d7 100644
--- a/source/blender/compositor/operations/COM_SunBeamsOperation.cc
+++ b/source/blender/compositor/operations/COM_SunBeamsOperation.cc
@@ -140,7 +140,8 @@ template<int fxu, int fxv, int fyu, int fyv> struct BufferLineAccumulator {
falloff_factor = dist_max > dist_min ? dr / (float)(dist_max - dist_min) : 0.0f;
- float *iter = input->getBuffer() + COM_NUM_CHANNELS_COLOR * (x + input->getWidth() * y);
+ float *iter = input->getBuffer() +
+ COM_data_type_num_channels(DataType::Color) * (x + input->getWidth() * y);
return iter;
}
@@ -169,7 +170,7 @@ template<int fxu, int fxv, int fyu, int fyv> struct BufferLineAccumulator {
if ((int)(co[0] - source[0]) == 0 && (int)(co[1] - source[1]) == 0) {
copy_v4_v4(output,
- input->getBuffer() + COM_NUM_CHANNELS_COLOR *
+ input->getBuffer() + COM_data_type_num_channels(DataType::Color) *
((int)source[0] + input->getWidth() * (int)source[1]));
return;
}
@@ -210,7 +211,7 @@ template<int fxu, int fxv, int fyu, int fyv> struct BufferLineAccumulator {
/* decrement u */
x -= fxu;
y -= fyu;
- buffer -= (fxu + fyu * buffer_width) * COM_NUM_CHANNELS_COLOR;
+ buffer -= (fxu + fyu * buffer_width) * COM_data_type_num_channels(DataType::Color);
/* decrement v (in steps of dv < 1) */
v_local -= dv;
@@ -219,7 +220,7 @@ template<int fxu, int fxv, int fyu, int fyv> struct BufferLineAccumulator {
x -= fxv;
y -= fyv;
- buffer -= (fxv + fyv * buffer_width) * COM_NUM_CHANNELS_COLOR;
+ buffer -= (fxv + fyv * buffer_width) * COM_data_type_num_channels(DataType::Color);
}
}