diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-28 10:31:57 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-28 10:31:57 +0400 |
commit | b340f930ec5639f24e7e2d47fab221fb752b61dd (patch) | |
tree | 0e880a36bb528d133af6d10701fc090716b3b7f8 /source/blender/imbuf/intern/dds/PixelFormat.h | |
parent | 09dc600839904a198ab4ba3fad62ce58c2d3aa07 (diff) |
style cleanup: changes to brace placement / newlines - for/while/if/switch
Diffstat (limited to 'source/blender/imbuf/intern/dds/PixelFormat.h')
-rw-r--r-- | source/blender/imbuf/intern/dds/PixelFormat.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/source/blender/imbuf/intern/dds/PixelFormat.h b/source/blender/imbuf/intern/dds/PixelFormat.h index 3c5cb34812c..308ea810f03 100644 --- a/source/blender/imbuf/intern/dds/PixelFormat.h +++ b/source/blender/imbuf/intern/dds/PixelFormat.h @@ -66,17 +66,14 @@ // Convert component \a c having \a inbits to the returned value having \a outbits. inline uint convert(uint c, uint inbits, uint outbits) { - if (inbits == 0) - { + if (inbits == 0) { return 0; } - else if (inbits >= outbits) - { + else if (inbits >= outbits) { // truncate return c >> (inbits - outbits); } - else - { + else { // bitexpand return (c << (outbits - inbits)) | convert(c, inbits, outbits - inbits); } @@ -85,21 +82,20 @@ // Get pixel component shift and size given its mask. inline void maskShiftAndSize(uint mask, uint * shift, uint * size) { - if (!mask) - { + if (!mask) { *shift = 0; *size = 0; return; } *shift = 0; - while((mask & 1) == 0) { + while ((mask & 1) == 0) { ++(*shift); mask >>= 1; } *size = 0; - while((mask & 1) == 1) { + while ((mask & 1) == 1) { ++(*size); mask >>= 1; } |