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 <ideasman42@gmail.com>2019-04-23 04:21:22 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-23 04:22:25 +0300
commit3302fbaeb1d5f58d926c06b6153ec5d6f1a9b0be (patch)
tree5be399e227415fef745bcdb2b7f20a578628718b /source/blender/compositor/operations/COM_InpaintOperation.cpp
parent64b4b719ebd5201d27aa25d7fa2d765eabded9b0 (diff)
Cleanup: style, use braces for compositor
Diffstat (limited to 'source/blender/compositor/operations/COM_InpaintOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_InpaintOperation.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/compositor/operations/COM_InpaintOperation.cpp b/source/blender/compositor/operations/COM_InpaintOperation.cpp
index 86d566834e6..0967984899d 100644
--- a/source/blender/compositor/operations/COM_InpaintOperation.cpp
+++ b/source/blender/compositor/operations/COM_InpaintOperation.cpp
@@ -125,10 +125,12 @@ void InpaintSimpleOperation::calc_manhatten_distance()
/* no need to clamp here */
if (this->get_pixel(i, j)[3] < 1.0f) {
r = width + height;
- if (i > 0)
+ if (i > 0) {
r = min_ii(r, m[j * width + i - 1] + 1);
- if (j > 0)
+ }
+ if (j > 0) {
r = min_ii(r, m[(j - 1) * width + i] + 1);
+ }
}
m[j * width + i] = r;
}
@@ -138,10 +140,12 @@ void InpaintSimpleOperation::calc_manhatten_distance()
for (int i = width - 1; i >= 0; i--) {
int r = m[j * width + i];
- if (i + 1 < width)
+ if (i + 1 < width) {
r = min_ii(r, m[j * width + i + 1] + 1);
- if (j + 1 < height)
+ }
+ if (j + 1 < height) {
r = min_ii(r, m[(j + 1) * width + i] + 1);
+ }
m[j * width + i] = r;