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:
authorCampbell Barton <campbell@blender.org>2022-09-25 11:33:28 +0300
committerCampbell Barton <campbell@blender.org>2022-09-25 13:17:08 +0300
commitf68cfd6bb078482c4a779a6e26a56e2734edb5b8 (patch)
tree2878e5b80dba5bdeba186d99661d604eb38879cd /source/blender/compositor/operations/COM_SMAAOperation.cc
parentc7b247a118e302a3afc6473797e53b6af28b69e2 (diff)
Cleanup: replace C-style casts with functional casts for numeric types
Diffstat (limited to 'source/blender/compositor/operations/COM_SMAAOperation.cc')
-rw-r--r--source/blender/compositor/operations/COM_SMAAOperation.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/compositor/operations/COM_SMAAOperation.cc b/source/blender/compositor/operations/COM_SMAAOperation.cc
index 55983572ede..7bbc600cda2 100644
--- a/source/blender/compositor/operations/COM_SMAAOperation.cc
+++ b/source/blender/compositor/operations/COM_SMAAOperation.cc
@@ -65,7 +65,7 @@ static void sample_bilinear_vertical(T *reader, int x, int y, float yoffset, flo
{
float iy = floorf(yoffset);
float fy = yoffset - iy;
- y += (int)iy;
+ y += int(iy);
float color00[4], color01[4];
@@ -83,7 +83,7 @@ static void sample_bilinear_horizontal(T *reader, int x, int y, float xoffset, f
{
float ix = floorf(xoffset);
float fx = xoffset - ix;
- x += (int)ix;
+ x += int(ix);
float color00[4], color10[4];
@@ -113,12 +113,12 @@ static inline const float *areatex_sample_internal(const float *areatex, int x,
static void area(int d1, int d2, int e1, int e2, float weights[2])
{
/* The areas texture is compressed quadratically: */
- float x = (float)(SMAA_AREATEX_MAX_DISTANCE * e1) + sqrtf((float)d1);
- float y = (float)(SMAA_AREATEX_MAX_DISTANCE * e2) + sqrtf((float)d2);
+ float x = float(SMAA_AREATEX_MAX_DISTANCE * e1) + sqrtf(float(d1));
+ float y = float(SMAA_AREATEX_MAX_DISTANCE * e2) + sqrtf(float(d2));
float ix = floorf(x), iy = floorf(y);
float fx = x - ix, fy = y - iy;
- int X = (int)ix, Y = (int)iy;
+ int X = int(ix), Y = int(iy);
const float *weights00 = areatex_sample_internal(areatex, X + 0, Y + 0);
const float *weights10 = areatex_sample_internal(areatex, X + 1, Y + 0);