diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-09-19 09:01:32 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-09-19 09:28:17 +0300 |
commit | 14b2a35c8bfd6d77f6357f929ddd82845436725f (patch) | |
tree | 54746d6a3cf0da24b95d2a9761e6222656eb5249 /source/blender/render/intern/include/texture.h | |
parent | 17a2820da8ad8ea23d336129f32e060e5746b047 (diff) |
Cleanup: use parenthesis for if statements in macros
Diffstat (limited to 'source/blender/render/intern/include/texture.h')
-rw-r--r-- | source/blender/render/intern/include/texture.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/render/intern/include/texture.h b/source/blender/render/intern/include/texture.h index 22023baab95..44ad508fe33 100644 --- a/source/blender/render/intern/include/texture.h +++ b/source/blender/render/intern/include/texture.h @@ -44,12 +44,15 @@ extern "C" { texres->tg = tex->gfac * ((texres->tg - 0.5f) * tex->contrast + tex->bright - 0.5f); \ texres->tb = tex->bfac * ((texres->tb - 0.5f) * tex->contrast + tex->bright - 0.5f); \ if (!(tex->flag & TEX_NO_CLAMP)) { \ - if (texres->tr < 0.0f) \ + if (texres->tr < 0.0f) { \ texres->tr = 0.0f; \ - if (texres->tg < 0.0f) \ + } \ + if (texres->tg < 0.0f) { \ texres->tg = 0.0f; \ - if (texres->tb < 0.0f) \ + } \ + if (texres->tb < 0.0f) { \ texres->tb = 0.0f; \ + } \ } \ if (tex->saturation != 1.0f) { \ float _hsv[3]; \ @@ -57,12 +60,15 @@ extern "C" { _hsv[1] *= tex->saturation; \ hsv_to_rgb(_hsv[0], _hsv[1], _hsv[2], &texres->tr, &texres->tg, &texres->tb); \ if ((tex->saturation > 1.0f) && !(tex->flag & TEX_NO_CLAMP)) { \ - if (texres->tr < 0.0f) \ + if (texres->tr < 0.0f) { \ texres->tr = 0.0f; \ - if (texres->tg < 0.0f) \ + } \ + if (texres->tg < 0.0f) { \ texres->tg = 0.0f; \ - if (texres->tb < 0.0f) \ + } \ + if (texres->tb < 0.0f) { \ texres->tb = 0.0f; \ + } \ } \ } \ ((void)0) |