From 64b4b719ebd5201d27aa25d7fa2d765eabded9b0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 23 Apr 2019 11:01:30 +1000 Subject: Cleanup: style, use braces for imbuf --- source/blender/imbuf/intern/dds/ColorBlock.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'source/blender/imbuf/intern/dds/ColorBlock.cpp') diff --git a/source/blender/imbuf/intern/dds/ColorBlock.cpp b/source/blender/imbuf/intern/dds/ColorBlock.cpp index c392ef351ff..581d740c97c 100644 --- a/source/blender/imbuf/intern/dds/ColorBlock.cpp +++ b/source/blender/imbuf/intern/dds/ColorBlock.cpp @@ -130,16 +130,21 @@ void ColorBlock::init(uint w, uint h, const float *data, uint x, uint y) static inline uint8 component(Color32 c, uint i) { - if (i == 0) + if (i == 0) { return c.r; - if (i == 1) + } + if (i == 1) { return c.g; - if (i == 2) + } + if (i == 2) { return c.b; - if (i == 3) + } + if (i == 3) { return c.a; - if (i == 4) + } + if (i == 4) { return 0xFF; + } return 0; } @@ -238,8 +243,9 @@ Color32 ColorBlock::averageColor() const bool ColorBlock::hasAlpha() const { for (uint i = 0; i < 16; i++) { - if (m_color[i].a != 255) + if (m_color[i].a != 255) { return true; + } } return false; } -- cgit v1.2.3