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:01:30 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-23 04:22:22 +0300
commit64b4b719ebd5201d27aa25d7fa2d765eabded9b0 (patch)
treec6e1147f3b81b90193d3acaa0df3f8c5c93db328 /source/blender/imbuf/intern/dds/ColorBlock.cpp
parentac53291e1ff79144ca41d63b0787bfe04da21677 (diff)
Cleanup: style, use braces for imbuf
Diffstat (limited to 'source/blender/imbuf/intern/dds/ColorBlock.cpp')
-rw-r--r--source/blender/imbuf/intern/dds/ColorBlock.cpp18
1 files changed, 12 insertions, 6 deletions
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;
}